summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-27 18:27:43 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-27 18:27:43 +0000
commit6f649500dde0d6cadd456fb11e31f5a05f5cc2c1 (patch)
tree3a3782919b7d46e8c8837c710c5c65629444b5b7 /src/map/script.c
parentf9fcb57f8a104581a89134b58b77bd450e61c49a (diff)
downloadhercules-6f649500dde0d6cadd456fb11e31f5a05f5cc2c1.tar.gz
hercules-6f649500dde0d6cadd456fb11e31f5a05f5cc2c1.tar.bz2
hercules-6f649500dde0d6cadd456fb11e31f5a05f5cc2c1.tar.xz
hercules-6f649500dde0d6cadd456fb11e31f5a05f5cc2c1.zip
- Fixed compilation error/warning on script command setbattleflag.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6323 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 625f49b5f..c1cedb9b4 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -6664,7 +6664,7 @@ int buildin_setmapflag(struct script_state *st)
{
int m,i;
char *str;
- char *val;
+ char *val=NULL;
str=conv_str(st,& (st->stack->stack_data[st->start+2]));
i=conv_num(st,& (st->stack->stack_data[st->start+3]));
@@ -6786,10 +6786,10 @@ int buildin_setmapflag(struct script_state *st)
map[m].flag.nocommand=1;
break;
case MF_JEXP:
- map[m].jexp = (atoi(val) < 0) ? 100 : atoi(val);
+ map[m].jexp = (!val || atoi(val) < 0) ? 100 : atoi(val);
break;
case MF_BEXP:
- map[m].bexp = (atoi(val) < 0) ? 100 : atoi(val);
+ map[m].bexp = (!val || atoi(val) < 0) ? 100 : atoi(val);
break;
}
}