fix filtertext

cropping space should work now
This commit is contained in:
ac-stef
2015-09-07 14:53:57 +02:00
parent 7bdd91bc9f
commit 9965f53d28
+6 -3
View File
@@ -214,12 +214,15 @@ char *filtertext(char *dst, const char *src, int flags, int len)
if(isspace(c))
{
if(leadingwhite) continue;
if(!lastwhite) lastwhite = dst;
if(nowhite && !((c == ' ' && allowblanks) || (c == '\n' && allownl)) && !pass) continue;
if(!lastwhite) lastwhite = dst;
}
else
{
lastwhite = NULL;
if(!pass && !isprint(c)) continue;
}
else if(!pass && !isprint(c)) continue;
leadingwhite = false;
lastwhite = NULL;
*dst++ = c;
if(!--len || !*src) break;
}