improve cutcolorstring
now takes the width of characters into account also: fix wraparound for docrefs
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user