diff --git a/src/mujs/VERSION b/src/mujs/VERSION index 1f54a82..3dfd330 100644 --- a/src/mujs/VERSION +++ b/src/mujs/VERSION @@ -1 +1 @@ -commit 32064e10caa45e68fc87331ca53d042049cc9396 +commit 76bd203f63d3c64fd54955caae4ca831b8e1cdff diff --git a/src/mujs/jslex.c b/src/mujs/jslex.c index 6dee5f2..cebd8ab 100644 --- a/src/mujs/jslex.c +++ b/src/mujs/jslex.c @@ -477,7 +477,7 @@ static int isregexpcontext(int last) static int lexregexp(js_State *J) { const char *s; - int g, m, i; + int g, m, i, flags; int inclass = 0; /* already consumed initial '/' */ @@ -525,10 +525,12 @@ static int lexregexp(js_State *J) jsY_error(J, "duplicated flag in regular expression"); J->text = s; - J->number = 0; - if (g) J->number += JS_REGEXP_G; - if (i) J->number += JS_REGEXP_I; - if (m) J->number += JS_REGEXP_M; + + flags = 0; + if (g) flags |= JS_REGEXP_G; + if (i) flags |= JS_REGEXP_I; + if (m) flags |= JS_REGEXP_M; + J->number = flags; return TK_REGEXP; }