I was looking for the proper way of solving this: http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&p=60174#60174
The code below is wrong
So just ignore this thread. However I’m still looking for a way to solve that problem.
And stumbled over this:
char *Q_CleanStr( char *string ) {
char* d;
char* s;
int c;
s = string;
d = string;
while ((c = *s) != 0 ) {
if ( Q_IsColorString( s ) ) {
s++;
}
else if ( c >= 0x20 && c <= 0x7E ) {
*d++ = c;
}
s++;
}
*d = '\0';
// CHRUKER: It was just returning the source string before
return d;
}
Originally this function returned the string variable, which is just the source so it actually didn’t do anything.
