X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..5622b5d1aa70abbdb3cc4a03f085f560eab06dbe:/projects/sgconf/main.cpp diff --git a/projects/sgconf/main.cpp b/projects/sgconf/main.cpp index d2671be4..ce8af73f 100644 --- a/projects/sgconf/main.cpp +++ b/projects/sgconf/main.cpp @@ -181,9 +181,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) @@ -946,7 +948,7 @@ while (1) break; case 'A': //nAme - ParseAnyString(optarg, &str, "koi8-r"); + ParseAnyString(optarg, &str, "koi8-ru"); req.name = str; break;