Skip to content

Bug: splitting define causes java regex error and arduino won't compile #1935

Closed
@nothinman

Description

@nothinman

This doesn't compile:

define SERIAL_BANNER "\

  1. Scan for sensors\n\
  2. Change sensor I2C address\n\
  3. Show readings for all sensors\n
    "

It causes this:
Exception in thread "Thread-6" java.lang.StackOverflowError
at java.util.regex.Pattern$Branch.match(Pattern.java:4114)
at java.util.regex.Pattern$GroupHead.match(Pattern.java:4168)
[..]

Changing it to:

define SERIAL_BANNER "1) Scan for sensors\n2) Change sensor I2C address\n3) Show readings for all sensors\n"

makes it work...

Marcin

Metadata

Metadata

Assignees

Labels

Component: PreprocessorThe Arduino sketch preprocessor converts .ino files into C++ code before compilation

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions