diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-02 10:43:54 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1997-12-02 10:43:54 -0200 |
| commit | 525a91fed36866e6cb99758790df729e036582a3 (patch) | |
| tree | 2da6a479499bfa59bfb79da83cb0f35769c8e253 | |
| parent | 868d16dee03e82eba5ad23b6ab6f65b791e3ae94 (diff) | |
| download | lua-525a91fed36866e6cb99758790df729e036582a3.tar.gz lua-525a91fed36866e6cb99758790df729e036582a3.tar.bz2 lua-525a91fed36866e6cb99758790df729e036582a3.zip | |
BUG: "lastline" was not reset on function entry, so debug information
started only in the 2nd line of a function.
| -rw-r--r-- | llex.c | 3 | ||||
| -rw-r--r-- | lua.stx | 3 |
2 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: llex.c,v 1.7 1997/11/19 17:35:47 roberto Exp roberto $ | 2 | ** $Id: llex.c,v 1.8 1997/11/21 19:00:46 roberto Exp roberto $ |
| 3 | ** Lexical Analizer | 3 | ** Lexical Analizer |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -60,7 +60,6 @@ void luaX_setinput (ZIO *z) | |||
| 60 | LexState *LS = L->lexstate; | 60 | LexState *LS = L->lexstate; |
| 61 | LS->current = '\n'; | 61 | LS->current = '\n'; |
| 62 | LS->linelasttoken = 0; | 62 | LS->linelasttoken = 0; |
| 63 | LS->lastline = 0; | ||
| 64 | LS->linenumber = 0; | 63 | LS->linenumber = 0; |
| 65 | LS->iflevel = 0; | 64 | LS->iflevel = 0; |
| 66 | LS->ifstate[0].skip = 0; | 65 | LS->ifstate[0].skip = 0; |
| @@ -1,6 +1,6 @@ | |||
| 1 | %{ | 1 | %{ |
| 2 | /* | 2 | /* |
| 3 | ** $Id: lua.stx,v 1.18 1997/11/19 17:29:23 roberto Exp roberto $ | 3 | ** $Id: lua.stx,v 1.19 1997/11/21 19:00:46 roberto Exp roberto $ |
| 4 | ** Syntax analizer and code generator | 4 | ** Syntax analizer and code generator |
| 5 | ** See Copyright Notice in lua.h | 5 | ** See Copyright Notice in lua.h |
| 6 | */ | 6 | */ |
| @@ -573,6 +573,7 @@ static void init_state (TaggedString *filename) | |||
| 573 | else | 573 | else |
| 574 | L->currState->maxvars = -1; /* flag no debug information */ | 574 | L->currState->maxvars = -1; /* flag no debug information */ |
| 575 | code_byte(0); /* to be filled with stacksize */ | 575 | code_byte(0); /* to be filled with stacksize */ |
| 576 | L->lexstate->lastline = 0; /* invalidate it */ | ||
| 576 | } | 577 | } |
| 577 | 578 | ||
| 578 | 579 | ||
