summaryrefslogtreecommitdiffstats
path: root/lua/lcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lcode.c')
-rw-r--r--lua/lcode.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/lua/lcode.c b/lua/lcode.c
index 614e452..820b95c 100644
--- a/lua/lcode.c
+++ b/lua/lcode.c
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 2.60 2011/08/30 16:26:41 roberto Exp $
+** $Id: lcode.c,v 2.62.1.1 2013/04/12 18:48:47 roberto Exp $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -330,10 +330,9 @@ int luaK_numberK (FuncState *fs, lua_Number r) {
setnvalue(&o, r);
if (r == 0 || luai_numisnan(NULL, r)) { /* handle -0 and NaN */
/* use raw representation as key to avoid numeric problems */
- setsvalue(L, L->top, luaS_newlstr(L, (char *)&r, sizeof(r)));
- incr_top(L);
- n = addk(fs, L->top - 1, &o);
- L->top--;
+ setsvalue(L, L->top++, luaS_newlstr(L, (char *)&r, sizeof(r)));
+ n = addk(fs, L->top - 1, &o);
+ L->top--;
}
else
n = addk(fs, &o, &o); /* regular case */
@@ -426,7 +425,7 @@ static void discharge2reg (FuncState *fs, expdesc *e, int reg) {
luaK_nil(fs, reg, 1);
break;
}
- case VFALSE: case VTRUE: {
+ case VFALSE: case VTRUE: {
luaK_codeABC(fs, OP_LOADBOOL, reg, e->k == VTRUE, 0);
break;
}