diff --git a/src/sbbs3/con_hi.cpp b/src/sbbs3/con_hi.cpp index 9234fabb739ec9174532f29785d98be0e8d2a4fa..b51959f904a1343790689adb8f9d00f7dcd0640f 100644 --- a/src/sbbs3/con_hi.cpp +++ b/src/sbbs3/con_hi.cpp @@ -82,12 +82,15 @@ int sbbs_t::stripattr(char *strin) e=strlen(strin); for(a=c=d=0;c<e && d<sizeof(str)-1;c++) { - if(strin[c]==CTRL_A) { + if(strin[c]==CTRL_A && strin[c+1]!=0) { a++; if(!validattr(strin[c+1])) { c++; - continue; } } - str[d++]=strin[c]; } + continue; + } + } + str[d++]=strin[c]; + } str[d]=0; strcpy(strin,str); return(a);