aboutsummaryrefslogtreecommitdiff
path: root/buffer.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-01-07 13:16:03 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-01-07 13:16:03 +0100
commit2c226842217f6260918496caa71ab03cc858e1d4 (patch)
treedd97497bebe22798dbc3149f2bb7d406187e5eaa /buffer.c
parentb812d77ede9b448088279d393460cfa147aa7fc6 (diff)
downloadvis-2c226842217f6260918496caa71ab03cc858e1d4.tar.gz
vis-2c226842217f6260918496caa71ab03cc858e1d4.tar.xz
buffer: fix buffer_move bug
Capacity also needs to be reset.
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/buffer.c b/buffer.c
index 1276cae..94c074e 100644
--- a/buffer.c
+++ b/buffer.c
@@ -167,7 +167,6 @@ const char *buffer_content0(Buffer *buf) {
char *buffer_move(Buffer *buf) {
char *data = buf->data;
- buffer_clear(buf);
- buf->data = NULL;
+ buffer_init(buf);
return data;
}