History

Lua 5.1.3-rc1

Lua Team committed 18 years ago

Commit ea97e791 parent 4d388a360 files · +732 −439Browse files

Showing the changes to src/lcode.c (1 of 60 files). Show all

Unified · Split

src/lcode.c+2−2
@@ -1,5 +1,5 @@
11 /*
2−** $Id: lcode.c,v 2.25a 2006/03/21 19:28:49 roberto Exp $
2+** $Id: lcode.c,v 2.25.1.3 2007/12/28 15:32:23 roberto Exp $
33 ** Code generator for Lua
44 ** See Copyright Notice in lua.h
55 */
@@ -699,7 +699,7 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { · 693 unmodified lines
699699 e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;
700700 switch (op) {
701701 case OPR_MINUS: {
702− if (e->k == VK)
702+ if (!isnumeral(e))
703703 luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
704704 codearith(fs, OP_UNM, e, &e2);
705705 break;