aboutsummaryrefslogtreecommitdiffstats
path: root/src/serd_internal.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-20 23:07:41 +0000
committerDavid Robillard <d@drobilla.net>2012-02-20 23:07:41 +0000
commit2bbd923eb74ffae7575d2aa36e1e31f8644e1a18 (patch)
treeae5cd112a3b255bfb3ad7f2e7b7469901b10316a /src/serd_internal.h
parent2b2e4f1007d216841358009f8ee0cadee2c69bb6 (diff)
downloadserd-2bbd923eb74ffae7575d2aa36e1e31f8644e1a18.tar.gz
serd-2bbd923eb74ffae7575d2aa36e1e31f8644e1a18.tar.bz2
serd-2bbd923eb74ffae7575d2aa36e1e31f8644e1a18.zip
Fix collection parsing code to not leak stack space.
Collection parsing now truly uses O(1) memory. Trim some fat. git-svn-id: http://svn.drobilla.net/serd/trunk@309 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/serd_internal.h')
-rw-r--r--src/serd_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serd_internal.h b/src/serd_internal.h
index e97929e7..6e535402 100644
--- a/src/serd_internal.h
+++ b/src/serd_internal.h
@@ -181,8 +181,8 @@ serd_bulk_sink_write(const void* buf, size_t len, SerdBulkSink* bsink)
// Write as much as possible into the remaining buffer space
memcpy(bsink->buf + bsink->size, buf, n);
bsink->size += n;
- buf = (uint8_t*)buf + n;
- len -= n;
+ buf = (uint8_t*)buf + n;
+ len -= n;
// Flush page if buffer is full
if (bsink->size == bsink->block_size) {