mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
word_wrap: hack to workaround long lines without spaces
This commit is contained in:
parent
e235a0991c
commit
fe6dda917a
@ -159,6 +159,7 @@ char *word_wrap(char* buffer, const char *string, int line_width, bool unicode)
|
||||
while (i < len)
|
||||
{
|
||||
unsigned counter;
|
||||
int pos = &buffer[i] - buffer;
|
||||
|
||||
/* copy string until the end of the line is reached */
|
||||
for (counter = 1; counter <= (unsigned)line_width; counter++)
|
||||
@ -214,6 +215,9 @@ char *word_wrap(char* buffer, const char *string, int line_width, bool unicode)
|
||||
i = k + 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (&buffer[i] - buffer == pos)
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user