git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
У init.d-скрипт додано параметр --pidfile у команду запуску
[stg.git]
/
projects
/
sgconf
/
main.cpp
diff --git
a/projects/sgconf/main.cpp
b/projects/sgconf/main.cpp
index d2671be4b9552084ba77c0934dccfd40fed9c473..0a2e12b4e301db9acbc8eef4c0fa88ac76bbdc16 100644
(file)
--- 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;
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)
msg = strchr(str, ':');
if (msg)