fix(color): Bitmap name truncation if exactly 14 characters long (#4232)

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
philmoz
2023-10-31 11:40:49 +10:00
committed by GitHub
co-authored by Peter Feerick
parent ba30278456
commit f5593c44e8
7 changed files with 21 additions and 22 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ static int luaModelSetInfo(lua_State *L)
#if LCD_DEPTH > 1
else if (!strcmp(key, "bitmap")) {
const char * name = luaL_checkstring(L, -1);
strncpy(g_model.header.bitmap, name, sizeof(g_model.header.bitmap));
strncpy(g_model.header.bitmap, name, LEN_BITMAP_NAME);
}
#endif
}