From 8269cd00762a808ac73f18a02085cc77958d6e6d Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 4 Feb 2012 19:11:16 +1000 Subject: Apply LuaJIT hotfix1. --- libraries/luajit-2.0/src/lj_lex.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'libraries/luajit-2.0/src/lj_lex.c') diff --git a/libraries/luajit-2.0/src/lj_lex.c b/libraries/luajit-2.0/src/lj_lex.c index 00daccd..59d8225 100644 --- a/libraries/luajit-2.0/src/lj_lex.c +++ b/libraries/luajit-2.0/src/lj_lex.c @@ -137,14 +137,17 @@ static int lex_number64(LexState *ls, TValue *tv) /* Parse a number literal. */ static void lex_number(LexState *ls, TValue *tv) { - int c; + int c, xp = 'E'; lua_assert(lj_char_isdigit(ls->current)); - do { + if ((c = ls->current) == '0') { + save_and_next(ls); + if ((ls->current & ~0x20) == 'X') xp = 'P'; + } + while (lj_char_isident(ls->current) || ls->current == '.' || + ((ls->current == '-' || ls->current == '+') && (c & ~0x20) == xp)) { c = ls->current; save_and_next(ls); - } while (lj_char_isident(ls->current) || ls->current == '.' || - ((ls->current == '-' || ls->current == '+') && - ((c & ~0x20) == 'E' || (c & ~0x20) == 'P'))); + } #if LJ_HASFFI c &= ~0x20; if ((c == 'I' || c == 'L' || c == 'U') && !ctype_ctsG(G(ls->L))) -- cgit v1.1