From c21ce0663b0be58ea2380dda765f406536a077dc Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 31 Jan 2011 15:18:28 +0000 Subject: [PATCH] 9.7 branc - Lua - fix memory.readdword function (was returning signed values), same fix as r296 of GENS --- desmume/src/lua-engine.cpp | 2 +- desmume/src/windows/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/desmume/src/lua-engine.cpp b/desmume/src/lua-engine.cpp index b085c1956..49b8bfad3 100644 --- a/desmume/src/lua-engine.cpp +++ b/desmume/src/lua-engine.cpp @@ -1755,7 +1755,7 @@ DEFINE_LUA_FUNCTION(memory_readword, "address") int address = luaL_checkinteger(L,1); unsigned short value = (unsigned short)(_MMU_read16(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") diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 6ab76a8bb..01d625fc3 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -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();