aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/luajit-2.0/src/lj_lex.c
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-02-04 19:11:16 +1000
committerDavid Walter Seikel2012-02-04 19:11:16 +1000
commit8269cd00762a808ac73f18a02085cc77958d6e6d (patch)
treee054c2e7b31eb06489f9700f945411cd70f09009 /libraries/luajit-2.0/src/lj_lex.c
parentFix up "assignments in the middle of expressions is legal in LSL, but not in ... (diff)
downloadSledjHamr-8269cd00762a808ac73f18a02085cc77958d6e6d.zip
SledjHamr-8269cd00762a808ac73f18a02085cc77958d6e6d.tar.gz
SledjHamr-8269cd00762a808ac73f18a02085cc77958d6e6d.tar.bz2
SledjHamr-8269cd00762a808ac73f18a02085cc77958d6e6d.tar.xz
Apply LuaJIT hotfix1.
Diffstat (limited to '')
-rw-r--r--libraries/luajit-2.0/src/lj_lex.c13
1 files changed, 8 insertions, 5 deletions
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)
137/* Parse a number literal. */ 137/* Parse a number literal. */
138static void lex_number(LexState *ls, TValue *tv) 138static void lex_number(LexState *ls, TValue *tv)
139{ 139{
140 int c; 140 int c, xp = 'E';
141 lua_assert(lj_char_isdigit(ls->current)); 141 lua_assert(lj_char_isdigit(ls->current));
142 do { 142 if ((c = ls->current) == '0') {
143 save_and_next(ls);
144 if ((ls->current & ~0x20) == 'X') xp = 'P';
145 }
146 while (lj_char_isident(ls->current) || ls->current == '.' ||
147 ((ls->current == '-' || ls->current == '+') && (c & ~0x20) == xp)) {
143 c = ls->current; 148 c = ls->current;
144 save_and_next(ls); 149 save_and_next(ls);
145 } while (lj_char_isident(ls->current) || ls->current == '.' || 150 }
146 ((ls->current == '-' || ls->current == '+') &&
147 ((c & ~0x20) == 'E' || (c & ~0x20) == 'P')));
148#if LJ_HASFFI 151#if LJ_HASFFI
149 c &= ~0x20; 152 c &= ~0x20;
150 if ((c == 'I' || c == 'L' || c == 'U') && !ctype_ctsG(G(ls->L))) 153 if ((c == 'I' || c == 'L' || c == 'U') && !ctype_ctsG(G(ls->L)))