summaryrefslogtreecommitdiff
path: root/apps/plugins/lua
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lua')
-rw-r--r--apps/plugins/lua/rocklib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c
index 27c1177748..2268063d3f 100644
--- a/apps/plugins/lua/rocklib.c
+++ b/apps/plugins/lua/rocklib.c
@@ -138,14 +138,14 @@ static fb_data* rli_element(lua_State *L)
138 138
139static int rli_set(lua_State *L) 139static int rli_set(lua_State *L)
140{ 140{
141 fb_data newvalue = (fb_data) luaL_checknumber(L, 4); 141 fb_data newvalue = FB_SCALARPACK((unsigned)luaL_checknumber(L, 4));
142 *rli_element(L) = newvalue; 142 *rli_element(L) = newvalue;
143 return 0; 143 return 0;
144} 144}
145 145
146static int rli_get(lua_State *L) 146static int rli_get(lua_State *L)
147{ 147{
148 lua_pushnumber(L, *rli_element(L)); 148 lua_pushnumber(L, FB_UNPACK_SCALAR_LCD(*rli_element(L)));
149 return 1; 149 return 1;
150} 150}
151 151