git.stg.codes
/
stg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Slightly changed patch from SpiderX <spiderx@spiderx.dp.ua> - sgauth.conf
[stg.git]
/
projects
/
sgconf
/
sginfo.cpp
diff --git
a/projects/sgconf/sginfo.cpp
b/projects/sgconf/sginfo.cpp
index 86352599c1e2cc81f3a7e43ce9442128b52f3e68..6879cb05ef2c4559cbd14417ac357474f22cee4d 100644
(file)
--- a/
projects/sgconf/sginfo.cpp
+++ b/
projects/sgconf/sginfo.cpp
@@
-37,9
+37,9
@@
#include <list>
#include <errno.h>
#include <list>
#include <errno.h>
+#include "stg/common.h"
+#include "stg/netunit.h"
#include "request.h"
#include "request.h"
-#include "common.h"
-#include "netunit.h"
#include "common_sg.h"
#include "sg_error_codes.h"
#include "common_sg.h"
#include "sg_error_codes.h"
@@
-182,9
+182,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)
@@
-327,7
+329,7
@@
setlocale(LC_ALL, "");
char charsetF[255];
strncpy(charsetF, nl_langinfo(CODESET), 255);
char charsetF[255];
strncpy(charsetF, nl_langinfo(CODESET), 255);
-char * charsetT = "koi8-r";
+char * charsetT = "koi8-r
u
";
size_t nconv = 1;
size_t nconv = 1;