From 94f6ab30f24411304de6ddaeac71129a610d57b1 Mon Sep 17 00:00:00 2001 From: Koncord Date: Wed, 28 Sep 2016 19:20:09 +0800 Subject: [PATCH] Fix GetProtocolVersion --- apps/openmw-mp/Script/ScriptFunctions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/openmw-mp/Script/ScriptFunctions.cpp b/apps/openmw-mp/Script/ScriptFunctions.cpp index c08475855..15132bdb3 100644 --- a/apps/openmw-mp/Script/ScriptFunctions.cpp +++ b/apps/openmw-mp/Script/ScriptFunctions.cpp @@ -128,5 +128,6 @@ const char *ScriptFunctions::GetServerVersion() noexcept const char *ScriptFunctions::GetProtocolVersion() noexcept { - return to_string((int)TES3MP_PROTO_VERSION).c_str(); + static string version = to_string(TES3MP_PROTO_VERSION); + return version.c_str(); } \ No newline at end of file