diff options
Diffstat (limited to 'lib/lua/src/lcode.c')
-rw-r--r-- | lib/lua/src/lcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lua/src/lcode.c b/lib/lua/src/lcode.c index acc7851..981a7fd 100644 --- a/lib/lua/src/lcode.c +++ b/lib/lua/src/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 1.6 2007-07-27 10:05:53 pixel Exp $ +** $Id: lcode.c,v 1.7 2008-02-17 00:35:20 pixel Exp $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -699,7 +699,7 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0; switch (op) { case OPR_MINUS: { - if (e->k == VK) + if (!isnumeral(e)) luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */ codearith(fs, OP_UNM, e, &e2); break; |