From f3b90d4a4d7e3eccab2953fa9d11f6e92ecc8dbd Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Mon, 31 Jan 2022 13:08:30 +0800 Subject: 5.11 --- 5/11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/5/11.c b/5/11.c index 1145bf2..df1f6b3 100644 --- a/5/11.c +++ b/5/11.c @@ -120,9 +120,10 @@ void entab(char *s, char *t, int *tablist, int tablistc) { } else { for (m = j, n = l; n <= tablist[i] && s[m] == ' '; m++, n++) ; - if (n == tablist[i]) { + if (n == tablist[i] + 1) { t[k++] = '\t'; l = n + 1; + j = m - 1; for (i += 1; i < tablistc && tablist[i] >= l; i++) ; } else { -- cgit v1.2.3