aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-09-28 09:37:17 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-09-28 09:37:17 -0300
commitab75bd23eef194c2aa9123765e3d13c820cf8af0 (patch)
tree334c588d03806ac79397e2a3845cc328a1c09f25 /ldebug.c
parentcee94df6e081b625a353bdd9a716cb8ef625e4cf (diff)
downloadlua-ab75bd23eef194c2aa9123765e3d13c820cf8af0.tar.gz
lua-ab75bd23eef194c2aa9123765e3d13c820cf8af0.tar.bz2
lua-ab75bd23eef194c2aa9123765e3d13c820cf8af0.zip
handle extended opcodes (with OP_EXTRAARG) when checking metamethod
calls
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldebug.c b/ldebug.c
index 8e63a4f9..00ab2284 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.53 2009/08/07 16:17:41 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.54 2009/09/23 20:33:05 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*/
@@ -386,6 +386,8 @@ static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) {
386 return NULL; /* calling function is not Lua (or is unknown) */ 386 return NULL; /* calling function is not Lua (or is unknown) */
387 ci = ci->previous; /* calling function */ 387 ci = ci->previous; /* calling function */
388 i = ci_func(ci)->l.p->code[currentpc(ci)]; 388 i = ci_func(ci)->l.p->code[currentpc(ci)];
389 if (GET_OPCODE(i) == OP_EXTRAARG) /* extra argument? */
390 i = ci_func(ci)->l.p->code[currentpc(ci) - 1]; /* get 'real' instruction */
389 switch (GET_OPCODE(i)) { 391 switch (GET_OPCODE(i)) {
390 case OP_CALL: 392 case OP_CALL:
391 case OP_TAILCALL: 393 case OP_TAILCALL: