diff --git a/desmume/src/lua-engine.cpp b/desmume/src/lua-engine.cpp index b085c1956..5f97e9b3a 100644 --- a/desmume/src/lua-engine.cpp +++ b/desmume/src/lua-engine.cpp @@ -1771,7 +1771,7 @@ DEFINE_LUA_FUNCTION(memory_readdword, "address") int address = luaL_checkinteger(L,1); unsigned long value = (unsigned long)(_MMU_read32(address)); lua_settop(L,0); - lua_pushinteger(L, value); + lua_pushnumber(L, value); // can't use pushinteger in this case (out of range) return 1; } DEFINE_LUA_FUNCTION(memory_readdwordsigned, "address")