summaryrefslogtreecommitdiffstats
path: root/5/11.c
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2022-01-25 18:23:52 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2022-01-25 18:23:52 +0800
commitc3501bee80128839cac640877e8f4925cef66f9a (patch)
treea509a44488f902ba449642b31c2f11889d87772e /5/11.c
parente5c621afcede4f2191158a0d1b4689035efc539f (diff)
downloadk&r-exercises-c3501bee80128839cac640877e8f4925cef66f9a.tar.gz
5.11
Diffstat (limited to '5/11.c')
-rw-r--r--5/11.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/5/11.c b/5/11.c
index 9db3375..6c9772a 100644
--- a/5/11.c
+++ b/5/11.c
@@ -53,8 +53,8 @@ int gettabs(char *s, int *t) {
for (i = 0, j = 0, k = 0; j < MAXTABLIST && k < MAXDIGLEN && s[i] != 0; i++) {
if (s[i] == ' ' || s[i] == ',') {
+ col[k] = 0;
t[j++] = atoi(col);
- col[0] = 0;
k = 0;
} else if (isdigit(s[i]))
col[k++] = s[i];