From 99dfe731e12d8f8e0c20190c723bbdcd742cbd01 Mon Sep 17 00:00:00 2001 From: chosenofbear Date: Tue, 23 Jun 2015 09:25:15 -0400 Subject: [PATCH] fix compile in VC++ with INI_ENCODING option --- src/config.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.cpp b/src/config.cpp index cbbbe99..5db26f5 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -348,7 +348,11 @@ void Config::readGameINI() size_t inLen = game.title.size(); size_t outLen = inLen * 4; std::string buf(outLen, '\0'); +#ifdef _MSC_VER + const char *inPtr = game.title.c_str(); +#else char *inPtr = const_cast(game.title.c_str()); +#endif char *outPtr = const_cast(buf.c_str()); errno = 0;