improve cutcolorstring

now takes the width of characters into account

also: fix wraparound for docrefs
This commit is contained in:
ac-stef
2017-04-24 21:48:57 +02:00
parent 9739464381
commit 8e08cddaa7
5 changed files with 20 additions and 16 deletions
-11
View File
@@ -377,17 +377,6 @@ void trimtrailingwhitespace(char *s)
s[n] = '\0';
}
void cutcolorstring(char *text, int len)
{ // limit string length, ignore color codes
while(*text)
{
if(*text == '\f' && text[1]) text++;
else len--;
if(len < 0) { *text = '\0'; break; }
text++;
}
}
const char *modefullnames[] =
{
"demo playback",