mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Undo faulty newlines, undo extra newlines.
This commit is contained in:
parent
81d4e4d2b8
commit
e457eb6635
|
@ -535,18 +535,13 @@ void wrap(char output[STRING_LENGTH], char input[STRING_LENGTH], int line_width)
|
|||
k--;
|
||||
}
|
||||
|
||||
if (k > 0) {
|
||||
if (k > m) {
|
||||
/* replace and set as new line start */
|
||||
output[k] = '\n';
|
||||
i = k + 1;
|
||||
} else {
|
||||
/* nothing found backwards: look forward */
|
||||
while ((i < len) && (output[i] != ' '))
|
||||
i++;
|
||||
|
||||
if (i < len)
|
||||
output[i] = '\n';
|
||||
}
|
||||
|
||||
/* else: nothing to do now, TODO shift string */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user