X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/75c3db512c67ff8f548d5fdd0e07c9f780973bcb..105771be792a6c3c909b8780540004f3c27238b8:/projects/sgconf/main.cpp diff --git a/projects/sgconf/main.cpp b/projects/sgconf/main.cpp index d2671be4..5e52d37d 100644 --- a/projects/sgconf/main.cpp +++ b/projects/sgconf/main.cpp @@ -181,9 +181,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)