diff options
Diffstat (limited to 'extmod/re1.5/compilecode.c')
| -rw-r--r-- | extmod/re1.5/compilecode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/extmod/re1.5/compilecode.c b/extmod/re1.5/compilecode.c index a685a508a..3f54b3993 100644 --- a/extmod/re1.5/compilecode.c +++ b/extmod/re1.5/compilecode.c @@ -53,6 +53,9 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode) PC++; // Skip # of pair byte prog->len++; for (cnt = 0; *re != ']'; re++, cnt++) { + if (*re == '\\') { + ++re; + } if (!*re) return NULL; EMIT(PC++, *re); if (re[1] == '-' && re[2] != ']') { |
