Skip to content

Commit

Permalink
gettext.cpp: Fix syntax error when using MSVC
Browse files Browse the repository at this point in the history
Also remove trailing whitespaces from the file
  • Loading branch information
jh10001 authored and est31 committed Aug 31, 2015
1 parent 714b68a commit dce9468
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/gettext.cpp
Expand Up @@ -167,7 +167,7 @@ void init_gettext(const char *path, const std::string &configured_language) {
if (parameters != "") {
ptr_parameters = parameters.c_str();
}

/** users may start by short name in commandline without extention **/
std::string appname = argv[0];
if (appname.substr(appname.length() - 4) != ".exe") {
Expand All @@ -184,7 +184,7 @@ void init_gettext(const char *path, const std::string &configured_language) {
NULL,
&startupinfo,
&processinfo)) {
char buffer[1024];
char buffer[1024];
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
GetLastError(),
Expand All @@ -202,14 +202,14 @@ void init_gettext(const char *path, const std::string &configured_language) {
else {
exit(0);
}
}
#else
errorstream << "*******************************************************" << std::endl;
errorstream << "Can't apply locale workaround for server!" << std::endl;
errorstream << "Expect language to be broken!" << std::endl;
errorstream << "*******************************************************" << std::endl;
errorstream << "*******************************************************" << std::endl;
errorstream << "Can't apply locale workaround for server!" << std::endl;
errorstream << "Expect language to be broken!" << std::endl;
errorstream << "*******************************************************" << std::endl;

#endif
}

setlocale(LC_ALL,configured_language.c_str());
#else // Mingw
Expand Down

0 comments on commit dce9468

Please sign in to comment.