From ac899c005274ff974565c8ab5c125c51feed4d69 Mon Sep 17 00:00:00 2001 From: Nick Foster Date: Fri, 13 Aug 2010 16:18:02 -0700 Subject: Small fix for fngets --- firmware/microblaze/lib/hal_io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/microblaze/lib') diff --git a/firmware/microblaze/lib/hal_io.c b/firmware/microblaze/lib/hal_io.c index f93b20030..a8654bce7 100644 --- a/firmware/microblaze/lib/hal_io.c +++ b/firmware/microblaze/lib/hal_io.c @@ -249,7 +249,7 @@ fngets(hal_uart_name_t u, char * const s, int len) char *x = s; while(((*x=(char)hal_uart_getc(u)) != '\n') && ((x-s) < len)) x++; *x = 0; - return (x-s)-1; + return (x-s); } int @@ -259,7 +259,7 @@ fngets_timeout(hal_uart_name_t u, char * const s, int len) while(((*x=(char)hal_uart_getc_timeout(u)) != '\n') && ((x-s) < len)) x++; *x = 0; if(x==s) return 0; - return (x-s)-1; + return (x-s); } char * -- cgit v1.2.3