summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-07-05 19:53:08 +0100
committerVincent Sanders <vincent.sanders@collabora.co.uk>2012-07-05 19:53:08 +0100
commita8c2e0102dd3ff0ca6285b74dd0bb8bad8c6372a (patch)
treee7944f7648b7d55d98ec4668f65688ab87b0c953
parent1c71d3e3cd593e69e04b200a968df3291c20b2de (diff)
downloadlibparserutils-a8c2e0102dd3ff0ca6285b74dd0bb8bad8c6372a.tar.gz
libparserutils-a8c2e0102dd3ff0ca6285b74dd0bb8bad8c6372a.tar.bz2
Fix input insertion.
The gap in teh input was being created at the wrong insertion point!
-rw-r--r--src/utils/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/buffer.c b/src/utils/buffer.c
index fcaf5d5..384e9a9 100644
--- a/src/utils/buffer.c
+++ b/src/utils/buffer.c
@@ -115,7 +115,7 @@ parserutils_error parserutils_buffer_insert(parserutils_buffer *buffer,
return error;
}
- memmove(buffer->data + buffer->length + len,
+ memmove(buffer->data + offset + len,
buffer->data + offset, buffer->length - offset);
memcpy(buffer->data + offset, data, len);