From 35ee16dd3908c021752e439a4fe4ea9e83af9ec0 Mon Sep 17 00:00:00 2001 From: Haru Date: Tue, 13 Nov 2018 17:38:21 +0100 Subject: Replace sd->channels with a VECTOR This removes some shady array compaction code and prepares the ground for some further fixes. Signed-off-by: Haru --- src/map/clif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 44cefcd7e..800b13833 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11083,8 +11083,8 @@ static void clif_parse_WisMessage(int fd, struct map_session_data *sd) if (chan) { int k; - ARR_FIND(0, sd->channel_count, k, sd->channels[k] == chan); - if (k < sd->channel_count || channel->join(chan, sd, "", true) == HCS_STATUS_OK) { + ARR_FIND(0, VECTOR_LENGTH(sd->channels), k, VECTOR_INDEX(sd->channels, k) == chan); + if (k < VECTOR_LENGTH(sd->channels) || channel->join(chan, sd, "", true) == HCS_STATUS_OK) { channel->send(chan,sd,message); } else { clif->message(fd, msg_fd(fd,1402)); //You're not in that channel, type '@join <#channel_name>' -- cgit v1.2.3-70-g09d2