From 8c2b034698d6d35eef89ebef727bd5b93c29c860 Mon Sep 17 00:00:00 2001 From: Asmodai Date: Wed, 21 Feb 2018 18:50:33 +0300 Subject: [PATCH] Fix default options when userinfo not set --- src/msvc/ReInfoZone.vcxproj | 2 +- src/msvc/ReInfoZone.vcxproj.filters | 2 +- src/player.cpp | 9 +++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/msvc/ReInfoZone.vcxproj b/src/msvc/ReInfoZone.vcxproj index bde9b58..aa1eb47 100644 --- a/src/msvc/ReInfoZone.vcxproj +++ b/src/msvc/ReInfoZone.vcxproj @@ -45,7 +45,7 @@ - + {88CFE56D-AFD1-43CC-9292-9DAA157286FB} diff --git a/src/msvc/ReInfoZone.vcxproj.filters b/src/msvc/ReInfoZone.vcxproj.filters index b4dd2e6..429727e 100644 --- a/src/msvc/ReInfoZone.vcxproj.filters +++ b/src/msvc/ReInfoZone.vcxproj.filters @@ -95,7 +95,7 @@ - + Configs diff --git a/src/player.cpp b/src/player.cpp index a214c80..9304a09 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -106,10 +106,11 @@ const char* CPlayer::getPosition(lang_t lang) void CPlayer::loadOptions(char* info) { uint8 options = g_engfuncs.pfnInfoKeyValue(info, "iz")[0]; - - if (options > '\\') - options--; - options -= ' '; + if (options) { + if (options > '\\') + options--; + options -= ' '; + } m_options.integer = (options ^ g_config.defaultOptions) & 63; m_lang = g_engfuncs.pfnInfoKeyValue(info, "lang");