lua fix potential null warning
I'm not sure this would happen but I suspect its possible to get malformed data back from lineinfo as this is how the error system tracks code flow and this is a hacked add-on to allow RLE (run length encoding) of said code flow data Change-Id: I4b914c632935f8b1a9fa960212c58e810b2db738
This commit is contained in:
parent
1fd190d02d
commit
074daea51f
1 changed files with 4 additions and 2 deletions
|
@ -802,8 +802,10 @@ static unsigned char *growLineInfo(FuncState *fs) {
|
|||
unsigned char, MAX_INT, "code size overflow");
|
||||
|
||||
p = &f->packedlineinfo[start];
|
||||
if (p && f->sizelineinfo > 0) {
|
||||
memset(p, INFO_FILL_BYTE, f->sizelineinfo - start);
|
||||
f->packedlineinfo[f->sizelineinfo - 1] = '\0';
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue