Skip to content

Commit

Permalink
Fix unsigned integer properties being returned as signed integers fro…
Browse files Browse the repository at this point in the history
…m Lua functions
  • Loading branch information
LBPHacker committed Nov 13, 2019
1 parent 7af51b5 commit d17c67b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lua/LuaScriptInterface.cpp
Expand Up @@ -2486,19 +2486,19 @@ void LuaScriptInterface::LuaGetProperty(lua_State* l, StructProperty property, i
case StructProperty::TransitionType:
case StructProperty::ParticleType:
case StructProperty::Integer:
lua_pushinteger(l, *((int*)propertyAddress));
lua_pushnumber(l, *((int*)propertyAddress));
break;
case StructProperty::UInteger:
lua_pushinteger(l, *((unsigned int*)propertyAddress));
lua_pushnumber(l, *((unsigned int*)propertyAddress));
break;
case StructProperty::Float:
lua_pushnumber(l, *((float*)propertyAddress));
break;
case StructProperty::Char:
lua_pushinteger(l, *((char*)propertyAddress));
lua_pushnumber(l, *((char*)propertyAddress));
break;
case StructProperty::UChar:
lua_pushinteger(l, *((unsigned char*)propertyAddress));
lua_pushnumber(l, *((unsigned char*)propertyAddress));
break;
case StructProperty::BString:
{
Expand Down

0 comments on commit d17c67b

Please sign in to comment.