We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2102ed0 commit e10476aCopy full SHA for e10476a
1 file changed
main.c
@@ -117,7 +117,7 @@ static void fmt(const char *str, int width)
117
w ++;
118
if (c == ' ' || c == '\t' || c == '\n')
119
last = ptr;
120
- if ((width > 0 && w > width && last) || c == '\n') {
+ if ((width > 0 && w >= width && last) || c == '\n') {
121
while(s != last) {
122
#ifdef _WIN32
123
int n = utf_ff(s, last);
@@ -132,6 +132,7 @@ static void fmt(const char *str, int width)
132
fflush(stdout);
133
w = 0;
134
last = s;
135
+ ptr = s;
136
continue;
137
}
138
0 commit comments