]> git.stg.codes - stg.git/blobdiff - projects/sgconf/sginfo.cpp
Fix compilation issues
[stg.git] / projects / sgconf / sginfo.cpp
index 86352599c1e2cc81f3a7e43ce9442128b52f3e68..aa247dfb37ef343a2c594fff5c1b9204e01b9d33 100644 (file)
@@ -182,9 +182,11 @@ double ParseCash(const char * c, string * message)
 double cash;
 char * msg;
 char * str;
-str = new char[strlen(c)];
+str = new char[strlen(c) + 1];
+
+strncpy(str, c, strlen(c));
+str[strlen(c)] = 0;
 
-strcpy(str, c);
 msg = strchr(str, ':');
 
 if (msg)
@@ -327,7 +329,7 @@ setlocale(LC_ALL, "");
 char charsetF[255];
 strncpy(charsetF, nl_langinfo(CODESET), 255);
 
-char * charsetT = "koi8-r";
+char * charsetT = "koi8-ru";
 
 size_t nconv = 1;