X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fchanserv.c;h=4e41784b0aa289a7506251bd28bb6667740dcf5a;hb=7078de864edb36df047c3b11d90f2fe47353e8dd;hp=d50c9147fbe56909b65f776179f763e99bb2ca8d;hpb=1bf0d430020a45aa7dc3b098234eb9df2c5ba294;p=srvx.git diff --git a/src/chanserv.c b/src/chanserv.c index d50c914..4e41784 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -4446,7 +4446,6 @@ static CHANSERV_FUNC(cmd_topic) new_topic[dpos++] = *ptr; //is % again break; } - ptr--; advtopic_index--; //no zero base if(!cData->advtopic[advtopic_index]) break; //just leave it empty @@ -4458,11 +4457,12 @@ static CHANSERV_FUNC(cmd_topic) break; case '\\': ptr++; /* and fall through */ + if(!*ptr) break; default: new_topic[dpos++] = *ptr; + ptr++; break; } - ptr++; } } else { while((tchar = topic_mask[pos++]) && (dpos <= TOPICLEN))