summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-05 08:53:26 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-03-05 08:53:26 +0000
commitcc77964c3e6134a6b2257501fd1b79c4330af4ea (patch)
treee14802773c408bec37d75793b7074fd67160dc00 /src
parent775bda16a3c02aca323df58bcc639e90e87fa789 (diff)
downloadhercules-cc77964c3e6134a6b2257501fd1b79c4330af4ea.tar.gz
hercules-cc77964c3e6134a6b2257501fd1b79c4330af4ea.tar.bz2
hercules-cc77964c3e6134a6b2257501fd1b79c4330af4ea.tar.xz
hercules-cc77964c3e6134a6b2257501fd1b79c4330af4ea.zip
* Fixed possible crash in script_reportdata, when a script string becomes NULL.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14731 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index d66edcd84..a90d03806 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -483,7 +483,14 @@ static void script_reportdata(struct script_data* data)
break;
case C_STR:
case C_CONSTSTR:// string
- ShowDebug("Data: string value=\"%s\"\n", data->u.str);
+ if( data->u.str )
+ {
+ ShowDebug("Data: string value=\"%s\"\n", data->u.str);
+ }
+ else
+ {
+ ShowDebug("Data: string value=NULL\n");
+ }
break;
case C_NAME:// reference
if( reference_tovariable(data) )