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])