diff options
Diffstat (limited to 'pico')
-rw-r--r-- | pico/buffer.c | 2 | ||||
-rw-r--r-- | pico/composer.c | 2 |
2 files changed, 2 insertions, 2 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++; diff --git a/pico/composer.c b/pico/composer.c index a20314b5..dcce3b79 100644 --- a/pico/composer.c +++ b/pico/composer.c @@ -3665,7 +3665,7 @@ call_builder(struct headerentry *entry, int *mangled, char **err) sbuflen += (6*term.t_ncol); line = line->next; } - + sbuflen++; if((sbuf=(char *)malloc(sbuflen * sizeof(*sbuf))) == NULL){ emlwrite("Can't malloc space to expand address", NULL); return(-1); |