diff options
Diffstat (limited to 'pico/buffer.c')
-rw-r--r-- | pico/buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pico/buffer.c b/pico/buffer.c index 741c969f..a38bac21 100644 --- a/pico/buffer.c +++ b/pico/buffer.c @@ -334,7 +334,7 @@ sgetline(char **ibuf, int *nchars, char *obuf, int blen) retval = FIOEOF; } else{ - len = obuf + blen; + len = obuf + blen - 1; while (*cbuf != CR && *cbuf != LF && *cbuf != '\0'){ if(bufp < len){ *bufp++ = *cbuf++; |