summaryrefslogtreecommitdiff
path: root/src/char/inter.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-10 19:07:00 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-10 19:07:00 +0000
commitca96d6732c71834c6424dfeb4b6696c381f6c662 (patch)
tree41f5bd448a296c46905d0049ea9415c91c670973 /src/char/inter.c
parent35f3b96c8d060651befb7241f5de158a16283a8d (diff)
downloadhercules-ca96d6732c71834c6424dfeb4b6696c381f6c662.tar.gz
hercules-ca96d6732c71834c6424dfeb4b6696c381f6c662.tar.bz2
hercules-ca96d6732c71834c6424dfeb4b6696c381f6c662.tar.xz
hercules-ca96d6732c71834c6424dfeb4b6696c381f6c662.zip
Modified the charservers to use a DBMap instead of a cyclic array for auth data.
Merged the auth fix from r12473 to TXT as well. Removed the no-op from r12547. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12551 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/inter.c')
-rw-r--r--src/char/inter.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/char/inter.c b/src/char/inter.c
index bb4b86367..6c4b1e3e2 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -8,6 +8,7 @@
#include "../common/malloc.h"
#include "../common/lock.h"
#include "../common/showmsg.h"
+#include "../common/strlib.h"
#include "char.h"
#include "inter.h"
#include "int_party.h"
@@ -480,14 +481,13 @@ static struct WisData* mapif_create_whisper(int fd, char* src, char* dst, char*
}
// Wisp/page request to send
-int mapif_parse_WisRequest(int fd) {
+int mapif_parse_WisRequest(int fd)
+{
struct mmo_charstatus* char_status;
struct WisData* wd;
char name[NAME_LENGTH];
int fd2;
- RFIFOHEAD(fd);
-
if (RFIFOW(fd,2)-52 >= sizeof(wd->msg)) {
ShowWarning("inter: Wis message size too long.\n");
return 0;
@@ -496,8 +496,8 @@ int mapif_parse_WisRequest(int fd) {
return 0;
}
- memcpy(name, RFIFOP(fd,28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex]
- name[NAME_LENGTH-1]= '\0';
+ safestrncpy(name, (char*)RFIFOP(fd,28), NAME_LENGTH); //Received name may be too large and not contain \0! [Skotlex]
+
// search if character exists before to ask all map-servers
char_status = search_character_byname(name);
if (char_status == NULL)