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 @@
1/*1/*
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 $
3** Code generator for Lua3** Code generator for Lua
4** See Copyright Notice in lua.h4** See Copyright Notice in lua.h
5*/5*/
@@ -699,7 +699,7 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { · 693 unmodified lines
699 e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;699 e2.t = e2.f = NO_JUMP; e2.k = VKNUM; e2.u.nval = 0;
700 switch (op) {700 switch (op) {
701 case OPR_MINUS: {701 case OPR_MINUS: {
702 if (e->k == VK)702 if (!isnumeral(e))
703 luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */703 luaK_exp2anyreg(fs, e); /* cannot operate on non-numeric constants */
704 codearith(fs, OP_UNM, e, &e2);704 codearith(fs, OP_UNM, e, &e2);
705 break;705 break;