diff options
author | Adrian Thurston <thurston@complang.org> | 2012-10-19 20:32:14 +0000 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-10-19 20:32:14 +0000 |
commit | 8561c99623c5ef5963cbb13ff6f8eac44de8a9ec (patch) | |
tree | ad78e4f53fea84045fcd9eb1860699b73897cb49 | |
parent | 5ef62c54d374a6ab75b672eef63c04b9cfb9fe15 (diff) | |
download | colm-8561c99623c5ef5963cbb13ff6f8eac44de8a9ec.tar.gz |
fixed typo-bug in buffer growth in str collection
-rw-r--r-- | colm/tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/colm/tree.c b/colm/tree.c index eac26354..76914a43 100644 --- a/colm/tree.c +++ b/colm/tree.c @@ -2039,7 +2039,7 @@ void strCollectAppend( StrCollect *collect, const char *data, long len ) { long newLen = collect->length + len; if ( newLen > collect->allocated ) { - collect->allocated *= newLen * 2; + collect->allocated = newLen * 2; collect->data = (char*) realloc( collect->data, collect->allocated ); } memcpy( collect->data + collect->length, data, len ); |