diff options
| -rw-r--r-- | src/source.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/source.cc b/src/source.cc index e1a0710..efa15e8 100644 --- a/src/source.cc +++ b/src/source.cc @@ -19,6 +19,7 @@ struct Buffer { String content; Link link; const Allocator* allocator; + usize cursor; }; bool buffer_init(const Allocator* allocator, @@ -30,6 +31,7 @@ bool buffer_init(const Allocator* allocator, Buffer* buffer = allocate<Buffer>(allocator, 1); if(buffer == nullptr) return false; + memset(buffer, 0, sizeof(*buffer)); String content, file; bool ret = slice_copy(allocator, content_in, &content); @@ -48,7 +50,6 @@ bool buffer_init(const Allocator* allocator, buffer->file = file; buffer->content = content; buffer->allocator = allocator; - buffer->link = {}; *out = buffer; return true; |
