Fix narrow/utf8 difference in incoming/outcoming messages
authornumber Zero <silverunicorn2011@yandex.ru>
Sat, 9 Jun 2018 14:31:35 +0000 (17:31 +0300)
committersfan5 <sfan5@live.de>
Sun, 10 Jun 2018 08:33:53 +0000 (10:33 +0200)
src/script/lua_api/l_server.cpp

index 05d2a334982f97733c7a13834959389371531e4c..7eba79565cc037c0b81446650d26742ddf6010f6 100644 (file)
@@ -74,7 +74,7 @@ int ModApiServer::l_chat_send_all(lua_State *L)
        // Get server from registry
        Server *server = getServer(L);
        // Send
-       server->notifyPlayers(narrow_to_wide(text));
+       server->notifyPlayers(utf8_to_wide(text));
        return 0;
 }
 
@@ -88,7 +88,7 @@ int ModApiServer::l_chat_send_player(lua_State *L)
        // Get server from registry
        Server *server = getServer(L);
        // Send
-       server->notifyPlayer(name, narrow_to_wide(text));
+       server->notifyPlayer(name, utf8_to_wide(text));
        return 0;
 }