summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-07 01:39:51 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-07 01:39:51 +0000
commit5b403ede768abc599e20652254bb758d7eebec6e (patch)
tree2e79ac4b3d5e55df140bc9c679a1c9d7b7d1b013 /src/char_sql/char.c
parentce8e4578a996e571810f5412db207bf42adf91dd (diff)
downloadhercules-5b403ede768abc599e20652254bb758d7eebec6e.tar.gz
hercules-5b403ede768abc599e20652254bb758d7eebec6e.tar.bz2
hercules-5b403ede768abc599e20652254bb758d7eebec6e.tar.xz
hercules-5b403ede768abc599e20652254bb758d7eebec6e.zip
- Fixed sql compile.
- Some small adjustments on how the user/password in the char server are read. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5207 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index 04cbc4483..9029ba773 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -3674,10 +3674,8 @@ int check_connect_login_server(int tid, unsigned int tick, int id, int data) {
session[login_fd]->func_parse = parse_tologin;
realloc_fifo(login_fd, FIFOSIZE_SERVERLINK, FIFOSIZE_SERVERLINK);
WFIFOW(login_fd,0) = 0x2710;
- memset(WFIFOP(login_fd,2), 0, 24);
- memcpy(WFIFOP(login_fd,2), userid, strlen(userid) < 24 ? strlen(userid) : 24);
- memset(WFIFOP(login_fd,26), 0, 24);
- memcpy(WFIFOP(login_fd,26), passwd, strlen(passwd) < 24 ? strlen(passwd) : 24);
+ memcpy(WFIFOP(login_fd,2), userid, 24);
+ memcpy(WFIFOP(login_fd,26), passwd, 24);
WFIFOL(login_fd,50) = 0;
WFIFOL(login_fd,54) = char_ip;
WFIFOL(login_fd,58) = char_port;
@@ -3989,9 +3987,9 @@ int char_config_read(const char *cfgName) {
ShowInfo("Console Silent Setting: %d\n", atoi(w2));
msg_silent = atoi(w2);
} else if (strcmpi(w1, "userid") == 0) {
- memcpy(userid, w2, 24);
+ strncpy(userid, w2, 24);
} else if (strcmpi(w1, "passwd") == 0) {
- memcpy(passwd, w2, 24);
+ strncpy(passwd, w2, 24);
} else if (strcmpi(w1, "server_name") == 0) {
memcpy(server_name, w2, sizeof(server_name));
server_name[sizeof(server_name) - 1] = '\0';