From 28fd42aa1b7de2964975ba8427a8302fbd37fe0a Mon Sep 17 00:00:00 2001 From: gocha Date: Wed, 15 Aug 2012 11:22:01 +0900 Subject: [PATCH] Lua: fix emu.message() not to overwrite the display string by other Lua functions. --- lua-engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua-engine.cpp b/lua-engine.cpp index 456013fd..bec6c353 100644 --- a/lua-engine.cpp +++ b/lua-engine.cpp @@ -1065,7 +1065,7 @@ DEFINE_LUA_FUNCTION(emu_message, "str") static char msg[1024]; strncpy(msg, str, 1024); - msg[1024] = '\0'; + msg[1023] = '\0'; S9xSetInfoString(msg); return 0;