Skip to content

Commit c266413

Browse files
authored
fix first line wrap issue
1 parent a37b02d commit c266413

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kirc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ printw(const char *format, ...) {
132132
for (i = 0; line[i] == ' '; ++i) {
133133
putchar(line[i]);
134134
}
135+
136+
spaceleft -= i - 1;
135137

136138
for(tok = strtok(line, " "); tok != NULL; tok = strtok(NULL, " ")) {
137139
wordwidth = strlen(tok);

0 commit comments

Comments
 (0)