diff options
author | Manoj Srivastava <srivasta@debian.org> | 2016-02-24 17:13:50 -0800 |
---|---|---|
committer | Manoj Srivastava <srivasta@debian.org> | 2016-02-24 17:13:50 -0800 |
commit | c0a05c28fb4b8c56dd81fb4df25a57b29df7823d (patch) | |
tree | 2065f3be67e33f9fc50caf679f6a4247b5486ad9 /src | |
parent | cf150317667c51cb679acfb11b133b78c80fee8a (diff) | |
parent | 2ee6529d711925d004fdfec56b8987f94997e69d (diff) |
Merge branch 'fix-buffer-allocation'
Diffstat (limited to 'src')
-rw-r--r-- | src/buf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -247,8 +247,8 @@ struct Buf *buf_append (buf, ptr, n_elem) /* May need to alloc more. */ if (n_elem + buf->nelts > buf->nmax) { - /* exact amount needed... */ - n_alloc = (n_elem + buf->nelts) * buf->elt_size; + /* exact count needed... */ + n_alloc = n_elem + buf->nelts; /* ...plus some extra */ if (((n_alloc * buf->elt_size) % 512) != 0 |