From 857aca7e39a73cbb312153448ecd2009ad7017cf Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 21 May 2014 23:20:34 +0200 Subject: [PATCH] Lua changes needed for the wizard --- radio/src/lua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/lua.cpp b/radio/src/lua.cpp index ad4c036d6..1c4e7d42e 100644 --- a/radio/src/lua.cpp +++ b/radio/src/lua.cpp @@ -264,7 +264,7 @@ static int luaLcdDrawPixmap(lua_State *L) const pm_char * error = bmpLoad(bitmap, filename, LCD_W, LCD_H); if (bitmap && !error) { lcd_bmp(x, y, bitmap); - // free(bitmap); + free(bitmap); } return 0; } @@ -275,7 +275,7 @@ static int luaLcdDrawScreenTitle(lua_State *L) int idx = luaL_checkinteger(L, 2); int cnt = luaL_checkinteger(L, 3); - displayScreenIndex(idx-1, cnt, 0); + if (cnt) displayScreenIndex(idx-1, cnt, 0); lcd_filled_rect(0, 0, LCD_W, FH, SOLID, FILL_WHITE|GREY_DEFAULT); title(str);