From: pk910 Date: Sat, 3 Mar 2012 09:04:03 +0000 (+0100) Subject: fixed bug in advtopic code X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=76a803c329f3dd218758bd03609065d3beeb190f fixed bug in advtopic code --- diff --git a/src/chanserv.c b/src/chanserv.c index 4e41784..887b95a 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -4421,10 +4421,10 @@ static CHANSERV_FUNC(cmd_topic) if(!isdigit(topic[pos])) break; } - if(advtopic_index < 0 || advtopic_index > MAXADVTOPICENTRIES) + if(advtopic_index < 0 || advtopic_index >= MAXADVTOPICENTRIES) { //invalid id! - reply("CSMSG_ADVTOPIC_INVALID_ID", advtopic_index); + reply("CSMSG_ADVTOPIC_INVALID_ID", advtopic_index+1); return 0; } if(cData->advtopic[advtopic_index])