summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/lcode.c b/lcode.c
index 3c39d0ce..16f5702a 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.60 2011/08/30 16:26:41 roberto Exp roberto $ 2** $Id: lcode.c,v 2.61 2012/08/14 18:12:34 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -330,10 +330,9 @@ int luaK_numberK (FuncState *fs, lua_Number r) {
330 setnvalue(&o, r); 330 setnvalue(&o, r);
331 if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */ 331 if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */
332 /* use raw representation as key to avoid numeric problems */ 332 /* use raw representation as key to avoid numeric problems */
333 setsvalue(L, L->top, luaS_newlstr(L, (char *)&r, sizeof(r))); 333 setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r)));
334 incr_top(L); 334 n = addk(fs, L->top - 1, &o);
335 n = addk(fs, L->top - 1, &o); 335 L->top--;
336 L->top--;
337 } 336 }
338 else 337 else
339 n = addk(fs, &o, &o); /* regular case */ 338 n = addk(fs, &o, &o); /* regular case */