From 76a803c329f3dd218758bd03609065d3beeb190f Mon Sep 17 00:00:00 2001 From: pk910 Date: Sat, 3 Mar 2012 10:04:03 +0100 Subject: [PATCH] fixed bug in advtopic code --- src/chanserv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]) -- 2.20.1