Commit 4a314a6f authored by Paul Sokolovsky's avatar Paul Sokolovsky

extmod/re1.5: Update to 0.8.1.

Allow literal minus in char classes to be in trailing position, e.g. [a-c-].
(Previously, minus was allowed only at the start.)

This increases ARM Thumb2 code size by 8 bytes.
parent 8edc2e4b
......@@ -55,7 +55,7 @@ static const char *_compilecode(const char *re, ByteProg *prog, int sizecode)
for (cnt = 0; *re != ']'; re++, cnt++) {
if (!*re) return NULL;
EMIT(PC++, *re);
if (re[1] == '-') {
if (re[1] == '-' && re[2] != ']') {
re += 2;
}
EMIT(PC++, *re);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment