Commit ac44647
authored
Fix: Correctly count length of longer lines when including newline escape sequence '\n'
The previous version of get_line did not increment the length counter for the final newline character when the line exceeded MAXLINE.
This commit adds a check after counting the extra characters before EOF and '\n'
Incrementing the counter if there was an escape sequence for newline1 parent e905fdd commit ac44647
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
57 | 61 | | |
58 | 62 | | |
59 | 63 | | |
| |||
0 commit comments