diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-07-29 07:21:27 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-07-29 07:21:27 +0300 |
commit | 1a914405660d6e11a04238ddaa533603325a5dec (patch) | |
tree | b408be3d8cbfc697f5b8edbfbbfcc327ff3c0001 | |
parent | b30f62468a5e923bf5d9533adec064ada1716459 (diff) | |
download | hercules-1a914405660d6e11a04238ddaa533603325a5dec.tar.gz hercules-1a914405660d6e11a04238ddaa533603325a5dec.tar.bz2 hercules-1a914405660d6e11a04238ddaa533603325a5dec.tar.xz hercules-1a914405660d6e11a04238ddaa533603325a5dec.zip |
Set all fields to 0 in fake bl's.
-rw-r--r-- | src/map/clif.c | 3 | ||||
-rw-r--r-- | src/map/script.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index cfbc3d252..092ffe2c7 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6099,6 +6099,7 @@ static void clif_map_property_mapall(int mapid, enum map_property property) struct block_list bl; unsigned char buf[16]; + memset(&bl, 0, sizeof(bl)); bl.id = 0; bl.type = BL_NUL; bl.m = mapid; @@ -17243,7 +17244,7 @@ static void clif_bg_updatescore(int16 m) struct block_list bl; unsigned char buf[6]; - bl.id = 0; + memset(&bl, 0, sizeof(bl)); bl.type = BL_NUL; bl.m = m; diff --git a/src/map/script.c b/src/map/script.c index e38aae562..bc59f9cf8 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -13220,6 +13220,7 @@ static BUILDIN(setmapflag) case MF_PVP_NOGUILD: map->list[m].flag.pvp_noguild = 1; break; case MF_GVG: { struct block_list bl; + memset(&bl, 0, sizeof(bl)); map->list[m].flag.gvg = 1; clif->map_property_mapall(m, MAPPROPERTY_AGITZONE); bl.type = BL_NUL; @@ -13306,6 +13307,7 @@ static BUILDIN(removemapflag) case MF_NOZENYPENALTY: map->list[m].flag.nozenypenalty = 0; break; case MF_PVP: { struct block_list bl; + memset(&bl, 0, sizeof(bl)); bl.type = BL_NUL; bl.m = m; map->list[m].flag.pvp = 0; @@ -13317,6 +13319,7 @@ static BUILDIN(removemapflag) case MF_PVP_NOGUILD: map->list[m].flag.pvp_noguild = 0; break; case MF_GVG: { struct block_list bl; + memset(&bl, 0, sizeof(bl)); bl.type = BL_NUL; bl.m = m; map->list[m].flag.gvg = 0; @@ -13384,6 +13387,7 @@ static BUILDIN(pvpon) struct s_mapiterator* iter; struct block_list bl; + memset(&bl, 0, sizeof(bl)); str = script_getstr(st,2); m = map->mapname2mapid(str); if( m < 0 || map->list[m].flag.pvp ) @@ -13444,6 +13448,7 @@ static BUILDIN(pvpoff) const char *str; struct block_list bl; + memset(&bl, 0, sizeof(bl)); str=script_getstr(st,2); m = map->mapname2mapid(str); if(m < 0 || !map->list[m].flag.pvp) @@ -13473,6 +13478,7 @@ static BUILDIN(gvgon) if(m >= 0 && !map->list[m].flag.gvg) { struct block_list bl; + memset(&bl, 0, sizeof(bl)); if( !strdb_exists(map->zone_db,MAP_ZONE_GVG_NAME) ) { ShowError("buildin_gvgon: zone_db missing '%s'\n",MAP_ZONE_GVG_NAME); return true; @@ -13497,6 +13503,7 @@ static BUILDIN(gvgoff) m = map->mapname2mapid(str); if(m >= 0 && map->list[m].flag.gvg) { struct block_list bl; + memset(&bl, 0, sizeof(bl)); map->zone_change2(m, map->list[m].prev_zone); map->list[m].flag.gvg = 0; clif->map_property_mapall(m, MAPPROPERTY_NOTHING); |