summaryrefslogtreecommitdiffstats
path: root/apps/plugins
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-08-08 07:23:58 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-08-08 07:36:04 -0500
commit8d77ec88a5f7c839f149b0bd5d159b762daa0cfb (patch)
tree1c51fc3d31941a8ba5bc655100c0a610b5a15ba8 /apps/plugins
parentd61ea6c5eeef4343e40c0225f22ad39c994f84a9 (diff)
downloadrockbox-8d77ec88a5f7c839f149b0bd5d159b762daa0cfb.tar.gz
rockbox-8d77ec88a5f7c839f149b0bd5d159b762daa0cfb.tar.bz2
rockbox-8d77ec88a5f7c839f149b0bd5d159b762daa0cfb.zip
lua LCD fix
forgot to set new size after realloc forgot to set sizelineinfo to 0 after free Change-Id: Iaf7533aafaba1e2abf9599c9e1d0b75d913a8c36
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/lua/ldebug.c1
-rw-r--r--apps/plugins/lua/lparser.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/lua/ldebug.c b/apps/plugins/lua/ldebug.c
index 446f7d1a45..4c3fc1df28 100644
--- a/apps/plugins/lua/ldebug.c
+++ b/apps/plugins/lua/ldebug.c
@@ -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);
diff --git a/apps/plugins/lua/lparser.c b/apps/plugins/lua/lparser.c
index bb08c51c0b..8b93237918 100644
--- a/apps/plugins/lua/lparser.c
+++ b/apps/plugins/lua/lparser.c
@@ -370,6 +370,7 @@ static void close_func (LexState *ls) {
f->packedlineinfo[fs->lastlineOffset+1]=0;
luaM_reallocvector(L, f->packedlineinfo, f->sizelineinfo,
fs->lastlineOffset+2, unsigned char);
+ f->sizelineinfo = fs->lastlineOffset + 2;
#else
luaM_reallocvector(L, f->lineinfo, f->sizelineinfo, fs->pc, int);
f->sizelineinfo = fs->pc;