summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjテクrn Lindeijer <bjorn@lindeijer.nl>2009-03-09 14:05:00 +0100
committerBjテクrn Lindeijer <bjorn@lindeijer.nl>2009-03-09 14:05:00 +0100
commit98464617e78eea12f2ac231e82ac5c3b07412fa5 (patch)
tree153e622d4d96b195bef0cb2dfd58036e4c859e14 /src
parent681e21b2f96d5905058c446204d5b83e7a022041 (diff)
downloadtmwa-98464617e78eea12f2ac231e82ac5c3b07412fa5.tar.gz
tmwa-98464617e78eea12f2ac231e82ac5c3b07412fa5.tar.bz2
tmwa-98464617e78eea12f2ac231e82ac5c3b07412fa5.tar.xz
tmwa-98464617e78eea12f2ac231e82ac5c3b07412fa5.zip
Fixes for some character server crashes
Patch by MadCamel.
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/char/char.c b/src/char/char.c
index df839ff..2719c03 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -2455,7 +2455,7 @@ int parse_char(int fd) {
break;
case 0x66: // キャラ選択
- if (RFIFOREST(fd) < 3)
+ if (!sd || RFIFOREST(fd) < 3)
return 0;
// if we activated email creation and email is default email
@@ -2553,7 +2553,7 @@ int parse_char(int fd) {
break;
case 0x67: // 作成
- if (RFIFOREST(fd) < 37)
+ if (!sd || RFIFOREST(fd) < 37)
return 0;
i = make_new_char(fd, RFIFOP(fd,2));
if (i < 0) {
@@ -2613,7 +2613,7 @@ int parse_char(int fd) {
}
case 0x68: // delete char //Yor's Fix
- if (RFIFOREST(fd) < 46)
+ if (!sd || RFIFOREST(fd) < 46)
return 0;
memcpy(email, RFIFOP(fd,6), 40);
if (e_mail_check(email) == 0)