Permalink
Browse files

fix being unable to set floating point values in element.property

broken in e92bbac
  • Loading branch information...
jacob1 committed Dec 18, 2015
1 parent 07be209 commit 37eb674d407cd76c1a8906b006095ac199f7bb9a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/lua/LuaScriptInterface.cpp
@@ -2560,7 +2560,7 @@ int LuaScriptInterface::elements_property(lua_State * l)
*((unsigned int*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
break;
case StructProperty::Float:
*((float*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
*((float*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checknumber(l, 3);
break;
case StructProperty::Char:
*((char*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);

0 comments on commit 37eb674

Please sign in to comment.