lua LCD fix

forgot to set new size after realloc

forgot to set sizelineinfo to 0 after free

Change-Id: Iaf7533aafaba1e2abf9599c9e1d0b75d913a8c36
This commit is contained in:
William Wilgus 2019-08-08 07:23:58 -05:00
parent d61ea6c5ee
commit 8d77ec88a5
2 changed files with 2 additions and 0 deletions

View file

@ -253,6 +253,7 @@ static int stripdebug (lua_State *L, Proto *f, const int level) {
case 3:
len += f->sizelineinfo;
f->packedlineinfo = luaM_freearray(L, f->packedlineinfo, f->sizelineinfo, unsigned char);
f->f->sizelineinfo = 0;
case 2:
len += f->sizelocvars * (sizeof(struct LocVar) + sizeof(dummy->tsv) + sizeof(struct LocVar *));
f->locvars = luaM_freearray(L, f->locvars, f->sizelocvars, struct LocVar);