diff options
| author | Sadeep Madurange <smadurange@users.noreply.github.com> | 2022-01-27 21:41:35 +0800 |
|---|---|---|
| committer | Sadeep Madurange <smadurange@users.noreply.github.com> | 2022-01-27 21:41:35 +0800 |
| commit | ac3618eeb0b8e676e9a4cdf227fda52818979274 (patch) | |
| tree | 45acb1891aa8fa68d133346b9f18d45988a02149 /5 | |
| parent | 83139dbf46bf65742ef5a2d3f022913cffd52908 (diff) | |
| download | k&r-exercises-ac3618eeb0b8e676e9a4cdf227fda52818979274.tar.gz | |
5.11
Diffstat (limited to '5')
| -rw-r--r-- | 5/11.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -110,11 +110,12 @@ void entab(char *s, char *t, int *tablist, int tablistc) { else col++; } else { - for (; col <= tablist[j++] && k < MAXTEXT; col++) + for (; col <= tablist[j] && k < MAXTEXT; col++) t[k++] = ' '; + j++; } } - } - t[j] = 0; + t[k] = 0; + } }
\ No newline at end of file |
