Skip to content

Commit

Permalink
fix being unable to set floating point values in element.property
Browse files Browse the repository at this point in the history
broken in e92bbac
  • Loading branch information
jacob1 committed Dec 18, 2015
1 parent 07be209 commit 37eb674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lua/LuaScriptInterface.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 37eb674

Please sign in to comment.