summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-05 00:00:37 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-05 00:00:37 +0000
commit4f80f6346a5628d842f86cca2f2d7404b3d65530 (patch)
tree2e9af21373cbd4bd61fd18b1894cb8169cf77fb5 /src/map
parent1e1170ebbbc7c91f341872d333a98e750093556c (diff)
downloadhercules-4f80f6346a5628d842f86cca2f2d7404b3d65530.tar.gz
hercules-4f80f6346a5628d842f86cca2f2d7404b3d65530.tar.bz2
hercules-4f80f6346a5628d842f86cca2f2d7404b3d65530.tar.xz
hercules-4f80f6346a5628d842f86cca2f2d7404b3d65530.zip
* Fixed party booking search increasing result counter, even when no results were found, causing crashes from r14516 onwards (bugreport:4615, since r14412).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14558 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/party.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/party.c b/src/map/party.c
index cb83a36bb..407221cde 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -1147,7 +1147,10 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
if (pb_ad->p_detail.mapid == mapid)
result_list[count] = pb_ad;
}
- count++;
+ if( result_list[count] )
+ {
+ count++;
+ }
}
iter->destroy(iter);
clif_PartyBookingSearchAck(sd->fd, result_list, count, more_result);