summaryrefslogtreecommitdiff
path: root/lcode.c
diff options
context:
space:
mode:
Diffstat (limited to 'lcode.c')
-rw-r--r--lcode.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lcode.c b/lcode.c
index b0edeafe..ab2a8295 100644
--- a/lcode.c
+++ b/lcode.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lcode.c,v 2.50 2011/01/31 14:28:41 roberto Exp roberto $ 2** $Id: lcode.c,v 2.51 2011/02/01 18:03:10 roberto Exp roberto $
3** Code generator for Lua 3** Code generator for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -242,11 +242,11 @@ static int codeextraarg (FuncState *fs, int a) {
242} 242}
243 243
244 244
245int luaK_codeABxX (FuncState *fs, OpCode o, int reg, int k) { 245int luaK_codek (FuncState *fs, int reg, int k) {
246 if (k < MAXARG_Bx) 246 if (k <= MAXARG_Bx)
247 return luaK_codeABx(fs, o, reg, k + 1); 247 return luaK_codeABx(fs, OP_LOADK, reg, k);
248 else { 248 else {
249 int p = luaK_codeABx(fs, o, reg, 0); 249 int p = luaK_codeABx(fs, OP_LOADKX, reg, 0);
250 codeextraarg(fs, k); 250 codeextraarg(fs, k);
251 return p; 251 return p;
252 } 252 }