aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ltests.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ltests.c b/ltests.c
index f7c0638a..ea61c741 100644
--- a/ltests.c
+++ b/ltests.c
@@ -142,7 +142,8 @@ static char *buildop (Proto *p, int pc, char *buff) {
142 Instruction i = p->code[pc]; 142 Instruction i = p->code[pc];
143 OpCode o = GET_OPCODE(i); 143 OpCode o = GET_OPCODE(i);
144 const char *name = luaP_opnames[o]; 144 const char *name = luaP_opnames[o];
145 sprintf(buff, "%4d - ", pc); 145 int line = luaG_getline(p->lineinfo, pc, 1, NULL);
146 sprintf(buff, "(%4d) %4d - ", line, pc);
146 switch (getOpMode(o)) { 147 switch (getOpMode(o)) {
147 case iABC: 148 case iABC:
148 sprintf(buff+strlen(buff), "%-12s%4d %4d %4d", name, 149 sprintf(buff+strlen(buff), "%-12s%4d %4d %4d", name,
@@ -575,6 +576,9 @@ static int testC (lua_State *L) {
575 else if EQ("insert") { 576 else if EQ("insert") {
576 lua_insert(L, getnum); 577 lua_insert(L, getnum);
577 } 578 }
579 else if EQ("replace") {
580 lua_replace(L, getnum);
581 }
578 else if EQ("gettable") { 582 else if EQ("gettable") {
579 lua_gettable(L, getnum); 583 lua_gettable(L, getnum);
580 } 584 }