9.7 branc - Lua - fix memory.readdword function (was returning signed values), same fix as r296 of GENS

This commit is contained in:
adelikat 2011-01-31 15:18:28 +00:00
parent 355d02eab5
commit c21ce0663b
2 changed files with 2 additions and 2 deletions

View File

@ -1755,7 +1755,7 @@ DEFINE_LUA_FUNCTION(memory_readword, "address")
int address = luaL_checkinteger(L,1);
unsigned short value = (unsigned short)(_MMU_read16<ARMCPU_ARM9>(address) & 0xFFFF);
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_readwordsigned, "address")

View File

@ -3047,7 +3047,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
g_thread_init (NULL);
hAppInst=hThisInstance;
OpenConsole(); // Init debug console
//OpenConsole(); // Init debug console
int ret = _main();