sbase

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

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

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

Diffstat:
Mwc.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;