summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-08 17:58:38 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-08 17:58:38 +0000
commit7d405eceea92418239dadaaad37f7c38e26aab25 (patch)
treee3610a880c8958f3b4c88647c261ddf33ff899a5 /src/map
parent4e8674860d894a1b1b9cbf6b7a7e19e7533ff29c (diff)
downloadhercules-7d405eceea92418239dadaaad37f7c38e26aab25.tar.gz
hercules-7d405eceea92418239dadaaad37f7c38e26aab25.tar.bz2
hercules-7d405eceea92418239dadaaad37f7c38e26aab25.tar.xz
hercules-7d405eceea92418239dadaaad37f7c38e26aab25.zip
Added a missing null pointer check in clif_parse_globalmessage
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9827 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/clif.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a50aa21bb..7a0d6b4ad 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -8524,9 +8524,9 @@ void clif_parse_GetCharNameRequest(int fd, struct map_session_data *sd) {
/*==========================================
* Validates and processes global messages
- *------------------------------------------
- */
-void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) // S 008c/00f3 <packet len>.w <strz>.?B
+ * S 008c/00f3 <packet len>.w <strz>.?B
+ *------------------------------------------*/
+void clif_parse_GlobalMessage(int fd, struct map_session_data* sd)
{
char* message;
unsigned int packetlen, messagelen, namelen;
@@ -8549,7 +8549,8 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data* sd) // S 008c/00f
int i;
// special case here - allow some more freedom for frost joke & dazzler
for(i = 0; i < MAX_SKILLTIMERSKILL; i++) // the only way to check ~.~
- if (sd->ud.skilltimerskill[i]->timer != -1 && (sd->ud.skilltimerskill[i]->skill_id == BA_FROSTJOKE || sd->ud.skilltimerskill[i]->skill_id == DC_SCREAM))
+ if (sd->ud.skilltimerskill[i] && sd->ud.skilltimerskill[i]->timer != -1 &&
+ (sd->ud.skilltimerskill[i]->skill_id == BA_FROSTJOKE || sd->ud.skilltimerskill[i]->skill_id == DC_SCREAM))
break;
if (i == MAX_SKILLTIMERSKILL) { // normal message, too long
ShowWarning("clif_parse_GlobalMessage: Player '%s' sent a message too long ('%.*s')!", sd->status.name, CHAT_SIZE, message);