X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/105771be792a6c3c909b8780540004f3c27238b8..0bd1fc824f16d5eca4db5c3901e8c20ade408786:/projects/sgconf/sginfo.cpp diff --git a/projects/sgconf/sginfo.cpp b/projects/sgconf/sginfo.cpp index 86352599..c5ab3eaf 100644 --- a/projects/sgconf/sginfo.cpp +++ b/projects/sgconf/sginfo.cpp @@ -182,9 +182,9 @@ double ParseCash(const char * c, string * message) double cash; char * msg; char * str; -str = new char[strlen(c)]; +str = new char[strlen(c) + 1]; -strcpy(str, c); +strncpy(str, c, strlen(c)); msg = strchr(str, ':'); if (msg)