diff options
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.75 2010/11/30 17:17:51 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.76 2011/01/26 16:30:02 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -342,10 +342,11 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int reg, | |||
342 | } | 342 | } |
343 | break; | 343 | break; |
344 | } | 344 | } |
345 | case OP_LOADK: { | 345 | case OP_LOADK: |
346 | case OP_LOADKX: { | ||
346 | if (reg == a) { | 347 | if (reg == a) { |
347 | int b = GETARG_Bx(i); | 348 | int b = (op == OP_LOADK) ? GETARG_Bx(i) |
348 | b = (b > 0) ? b - 1 : GETARG_Ax(p->code[pc + 1]); | 349 | : GETARG_Ax(p->code[pc + 1]); |
349 | if (ttisstring(&p->k[b])) { | 350 | if (ttisstring(&p->k[b])) { |
350 | what = "constant"; | 351 | what = "constant"; |
351 | *name = svalue(&p->k[b]); | 352 | *name = svalue(&p->k[b]); |