From 2adf06b7dacb1149169e666837655b116ddc83a0 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 16 Jun 2018 09:32:35 +0600 Subject: [PATCH] Fixes Lua flash.getstring builtin --- samples/Example_Lua/lua-5.2.0/src/lflashlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/Example_Lua/lua-5.2.0/src/lflashlib.c b/samples/Example_Lua/lua-5.2.0/src/lflashlib.c index 3496a7778..e9ba49434 100644 --- a/samples/Example_Lua/lua-5.2.0/src/lflashlib.c +++ b/samples/Example_Lua/lua-5.2.0/src/lflashlib.c @@ -218,7 +218,7 @@ static int flash_getstring (lua_State *L) { AS3_CopyCStringToVar(propname, s1, l); char *str = NULL; lua_pop(L, 2); - inline_as3("%0 = CModule.mallocString(\"\"+__lua_objrefs[%1][%2]);\n" : "=r"(str) : "r"(obj), "r"(s1)); + inline_as3("%0 = CModule.mallocString(\"\"+__lua_objrefs[%1][propname]);\n" : "=r"(str) : "r"(obj)); lua_pushfstring(L, "%s", str); free(str); return 1;