From 446097f97b71ce20fa8d1e45e070f2e62676003e Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Fri, 23 Sep 2016 00:52:57 +0800 Subject: Bug 697021: Count used string space correctly. Account for used space before comparison, not after. --- platform/x11/jstest_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/x11/jstest_main.c b/platform/x11/jstest_main.c index 768d67f1..13c3a0a3 100644 --- a/platform/x11/jstest_main.c +++ b/platform/x11/jstest_main.c @@ -201,7 +201,7 @@ my_getline(FILE *file) *d++ = (char)c; c = fgetc(file); } - while (c >= 32 && space--); + while (c >= 32 && --space); /* If we ran out of space, skip the rest of the line */ if (space == 0) -- cgit v1.2.3