diff options
Diffstat (limited to 'src/scripting/lua.cpp')
-rw-r--r-- | src/scripting/lua.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripting/lua.cpp b/src/scripting/lua.cpp index 11f42f50..e0cd4e16 100644 --- a/src/scripting/lua.cpp +++ b/src/scripting/lua.cpp @@ -1241,9 +1241,9 @@ static int chatmessage(lua_State *s) if (lua_gettop(s) == 2 && lua_isuserdata(s, 1) && lua_isstring(s, 2) ) { Being *being = getBeing(s, 1); - std::string message = lua_tostring(s, 2); + const std::string message = lua_tostring(s, 2); - if (being && message != "") + if (being && !message.empty()) { GameState::sayTo(being, NULL, message); } |