9os

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 13e5e0ad5a64cc0d35e641044949679f6b5c6c20
parent 828db5ead2bca36368d874d9ec55b6c23f2f292e
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 18 Sep 2020 16:11:10 +0200

devcons: Fix wordsize

Wordsize was returning 1 instead of returning the number
of characters of the word.

Change-Id: I7086e8386fa26a0c5e2a2fe99c864c36b0626469

Diffstat:
Msrc/os9/dev/devcons.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/os9/dev/devcons.c b/src/os9/dev/devcons.c @@ -281,14 +281,14 @@ erase(int n) static int wordsize(void) { - int i = 1; + int n = 1; - while (head - i > 0 && buffer[head - i] == ' ') - i++; - while (head - i > 0 && buffer[head - i] != ' ') - i++; + while (head - n > 0 && buffer[head - n] == ' ') + n++; + while (head - n > 0 && buffer[head - n] != ' ') + n++; - return 1; + return n; } static int