From 54f510434504baabdaf41c743be3dbae041202c0 Mon Sep 17 00:00:00 2001 From: Koncord Date: Thu, 31 Aug 2017 20:08:49 +0800 Subject: [PATCH] [General] Escape format for strings --- apps/openmw/mwmp/GUI/GUIChat.cpp | 2 +- components/openmw-mp/Packets/BasePacket.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwmp/GUI/GUIChat.cpp b/apps/openmw/mwmp/GUI/GUIChat.cpp index 8ded6456a..7e464ce47 100644 --- a/apps/openmw/mwmp/GUI/GUIChat.cpp +++ b/apps/openmw/mwmp/GUI/GUIChat.cpp @@ -123,7 +123,7 @@ namespace mwmp else { mHistory->addText(color + msg); - LOG_MESSAGE_SIMPLE(Log::LOG_INFO, msg.c_str()); + LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", msg.c_str()); } } diff --git a/components/openmw-mp/Packets/BasePacket.hpp b/components/openmw-mp/Packets/BasePacket.hpp index e298d27b7..e6bd68fea 100644 --- a/components/openmw-mp/Packets/BasePacket.hpp +++ b/components/openmw-mp/Packets/BasePacket.hpp @@ -80,7 +80,7 @@ namespace mwmp { if (write) { - RakNet::RakString rstr(str.c_str()); + RakNet::RakString rstr("%s", str.c_str()); if (compress) rstr.SerializeCompressed(bs); else