sbase

suckless unix tools
git clone git://git.2f30.org/sbase.git
Log | Files | Refs | README | LICENSE

commit b744ad5216e4ab66151d97086162c8cf8aff8380
parent fbd786d22aa097f81cea6d4323f79df22fda9d2e
Author: sin <sin@2f30.org>
Date:   Fri Jan 10 22:51:13 +0000

If there's no newline we don't count the last word - fix it

Diffstat:
wc.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/wc.c b/wc.c @@ -95,6 +95,8 @@ wc(FILE *fp, const char *str) nw++; } } + if (word) + nw++; tc += nc; tl += nl; tw += nw;