From 7523a733464d359297a8f294e7e0a34ed53e02c9 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Tue, 23 Apr 2019 23:40:41 +0300 Subject: [PATCH] [Server] Fix return values for server functions providing system info --- apps/openmw-mp/Script/Functions/Server.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw-mp/Script/Functions/Server.cpp b/apps/openmw-mp/Script/Functions/Server.cpp index 2a60bedd4..5ce87cf4b 100644 --- a/apps/openmw-mp/Script/Functions/Server.cpp +++ b/apps/openmw-mp/Script/Functions/Server.cpp @@ -84,12 +84,14 @@ unsigned int ServerFunctions::GetMillisecondsSinceServerStart() noexcept const char *ServerFunctions::GetOperatingSystemType() noexcept { - return Utils::getOperatingSystemType().c_str(); + static const std::string operatingSystemType = Utils::getOperatingSystemType(); + return operatingSystemType.c_str(); } const char *ServerFunctions::GetArchitectureType() noexcept { - return Utils::getArchitectureType().c_str(); + static const std::string architectureType = Utils::getArchitectureType(); + return architectureType.c_str(); } const char *ServerFunctions::GetServerVersion() noexcept