From 0d4763d281e5b8f37b592dda1e37ccd951480889 Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 31 Jan 2011 15:17:51 +0000 Subject: [PATCH] Lua - fix memory.readdword function (was returning signed values), same fix as r296 of GENS --- desmume/src/lua-engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")