aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
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 9ff7edeb..8cb00e51 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -783,11 +783,13 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
783** previous instruction 'oldpc'. 783** previous instruction 'oldpc'.
784*/ 784*/
785static int changedline (const Proto *p, int oldpc, int newpc) { 785static int changedline (const Proto *p, int oldpc, int newpc) {
786 if (p->lineinfo == NULL) /* no debug information? */
787 return 0;
786 while (oldpc++ < newpc) { 788 while (oldpc++ < newpc) {
787 if (p->lineinfo[oldpc] != 0) 789 if (p->lineinfo[oldpc] != 0)
788 return (luaG_getfuncline(p, oldpc - 1) != luaG_getfuncline(p, newpc)); 790 return (luaG_getfuncline(p, oldpc - 1) != luaG_getfuncline(p, newpc));
789 } 791 }
790 return 0; /* no line changes in the way */ 792 return 0; /* no line changes between positions */
791} 793}
792 794
793 795