Skip to content
Snippets Groups Projects
Commit afce03f2 authored by rswindell's avatar rswindell
Browse files

Fixed stripattr() for strings that end in a Ctrl-A char.

parent 1fda222f
Branches
Tags
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment