History

Lua 5.1-work5

Lua Team committed 21 years ago

Commit e684a4d1 parent 930912737 files · +938 −717Browse files

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

Unified · Split

src/lcode.c+2−2
@@ -1,5 +1,5 @@
11 /*
2−** $Id: lcode.c,v 2.8 2004/12/03 20:35:33 roberto Exp $
2+** $Id: lcode.c,v 2.9 2005/01/10 18:17:39 roberto Exp $
33 ** Code generator for Lua
44 ** See Copyright Notice in lua.h
55 */
@@ -606,7 +606,7 @@ void luaK_prefix (FuncState *fs, UnOpr op, expdesc *e) { · 600 unmodified lines
606606 if (op == OPR_MINUS) {
607607 luaK_exp2val(fs, e);
608608 if (e->k == VK && ttisnumber(&fs->f->k[e->info]))
609− e->info = luaK_numberK(fs, -nvalue(&fs->f->k[e->info]));
609+ e->info = luaK_numberK(fs, num_unm(nvalue(&fs->f->k[e->info])));
610610 else {
611611 luaK_exp2anyreg(fs, e);
612612 freeexp(fs, e);