summaryrefslogtreecommitdiff
path: root/src/lcode.c
diff options
context:
space:
mode:
authorLua Team <team@lua.org>2008-01-17 12:00:00 +0000
committerrepogen <>2008-01-17 12:00:00 +0000
commitb2874e1bcdc4d4a56d8a232a88d5e17c6a9826f5 (patch)
treec173f097145da6d8df8e8fea09b6ec6bba8c5476 /src/lcode.c
parentf3572f5f7e364810f6ac5f99e0eced99c4722418 (diff)
downloadlua-github-b2874e1bcdc4d4a56d8a232a88d5e17c6a9826f5.tar.gz
Lua 5.1.3-rc15.1.3-rc1
Diffstat (limited to 'src/lcode.c')
-rw-r--r--src/lcode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lcode.c b/src/lcode.c
index 9ce515ab..cff626b7 100644
--- a/src/lcode.c
+++ b/src/lcode.c
@@ -1,5 +1,5 @@
/*
-** $Id: lcode.c,v 2.25a 2006/03/21 19:28:49 roberto Exp $
+** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto 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;