diff options
Diffstat (limited to 'ldebug.c')
| -rw-r--r-- | ldebug.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 2.52 2009/06/10 16:57:53 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.53 2009/08/07 16:17:41 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 | */ |
| @@ -299,7 +299,9 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int reg, | |||
| 299 | switch (op) { | 299 | switch (op) { |
| 300 | case OP_GETGLOBAL: { | 300 | case OP_GETGLOBAL: { |
| 301 | if (reg == a) { | 301 | if (reg == a) { |
| 302 | int g = GETARG_Bx(i); /* global index */ | 302 | int g = GETARG_Bx(i); |
| 303 | if (g != 0) g--; | ||
| 304 | else g = GETARG_Ax(p->code[++pc]); | ||
| 303 | lua_assert(ttisstring(&p->k[g])); | 305 | lua_assert(ttisstring(&p->k[g])); |
| 304 | *name = svalue(&p->k[g]); | 306 | *name = svalue(&p->k[g]); |
| 305 | what = "global"; | 307 | what = "global"; |
