From 6f649500dde0d6cadd456fb11e31f5a05f5cc2c1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 27 Apr 2006 18:27:43 +0000 Subject: - 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 --- src/map/script.c | 6 +++--- 1 file 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; } } -- cgit v1.2.3-70-g09d2