summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 02686ec..300a424 100644
--- a/main.c
+++ b/main.c
@@ -59,7 +59,8 @@ int main(int argc, char **argv) {
int len = 0;
for(char *pos = text; pos < end; pos++) {
if(isblank(*pos)) {
- user->words++;
+ if(len)
+ user->words++;
word[len] = '\0';
len = 0;
*word = '\0';