mirror of
https://github.com/processing/processing4.git
synced 2026-01-29 03:11:08 +01:00
Scrub comments: skip the second chracter in the escape sequence
Fixes #5016
This commit is contained in:
@@ -730,10 +730,16 @@ public class PdePreprocessor {
|
||||
throw new RuntimeException("Missing the */ from the end of a " +
|
||||
"/* comment */");
|
||||
}
|
||||
} else if (p[index] == '"' && index > 0 && p[index-1] != '\\') {
|
||||
|
||||
// switch in/out of quoted region
|
||||
} else if (p[index] == '"') {
|
||||
insideQuote = !insideQuote;
|
||||
index++;
|
||||
|
||||
// skip the escaped char
|
||||
} else if (insideQuote && p[index] == '\\') {
|
||||
index += 2;
|
||||
|
||||
} else { // any old character, move along
|
||||
index++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user