diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 17:28:08 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 17:28:08 -0700 |
commit | f626a4f21d7301e573bcb601f16bf6ba38352c34 (patch) | |
tree | 27f8d08cd53ad8ae3328ba404fbed9b1e014bf67 /firmware/microblaze/lib/hal_io.c | |
parent | ac899c005274ff974565c8ab5c125c51feed4d69 (diff) | |
download | uhd-f626a4f21d7301e573bcb601f16bf6ba38352c34.tar.gz uhd-f626a4f21d7301e573bcb601f16bf6ba38352c34.tar.bz2 uhd-f626a4f21d7301e573bcb601f16bf6ba38352c34.zip |
Fixed behavior when no GPS present.
Diffstat (limited to 'firmware/microblaze/lib/hal_io.c')
-rw-r--r-- | firmware/microblaze/lib/hal_io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/microblaze/lib/hal_io.c b/firmware/microblaze/lib/hal_io.c index a8654bce7..261c8cc2a 100644 --- a/firmware/microblaze/lib/hal_io.c +++ b/firmware/microblaze/lib/hal_io.c @@ -256,9 +256,9 @@ int fngets_timeout(hal_uart_name_t u, char * const s, int len) { char *x = s; - while(((*x=(char)hal_uart_getc_timeout(u)) != '\n') && ((x-s) < len)) x++; + + while(((*x=(char)hal_uart_getc_timeout(u)) != '\n') && (*x != -1) && ((x-s) < len)) x++; *x = 0; - if(x==s) return 0; return (x-s); } |