fix off by one error (to agree with comment, no less)

CVS patchset: 370
CVS date: 1996/02/20 22:25:21
This commit is contained in:
root 1996-02-20 22:25:21 +00:00
parent c40c0b624c
commit 31963f7978
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ void appendStringBufAux(StringBuf sb, char *s, int nl)
l = strlen(s);
/* If free == l there is no room for NULL terminator! */
while ((l + nl) > sb->free) {
while ((l + nl + 1) > sb->free) {
sb->allocated += BUF_CHUNK;
sb->free += BUF_CHUNK;
sb->buf = realloc(sb->buf, sb->allocated);