Undo faulty newlines, undo extra newlines.

This commit is contained in:
Coren[m] 2013-11-12 14:17:26 +01:00
parent 81d4e4d2b8
commit e457eb6635
No known key found for this signature in database
GPG Key ID: AFA6943800F5DC6D

View File

@ -535,18 +535,13 @@ void wrap(char output[STRING_LENGTH], char input[STRING_LENGTH], int line_width)
k--; k--;
} }
if (k > 0) { if (k > m) {
/* replace and set as new line start */ /* replace and set as new line start */
output[k] = '\n'; output[k] = '\n';
i = k + 1; 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 */
} }
} }