X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..8d18bde0f40cac840d25b98e48b1a8dfcc2157ff:/projects/sgconf/main.cpp?ds=sidebyside 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)