Fix off-by-one deinit on DocumentStore
This commit is contained in:
parent
088dc570de
commit
0f65093812
@ -190,7 +190,8 @@ fn newDocument(self: *DocumentStore, uri: []const u8, text: [:0]u8) anyerror!*Ha
|
|||||||
.document = .{
|
.document = .{
|
||||||
.uri = uri,
|
.uri = uri,
|
||||||
.text = text,
|
.text = text,
|
||||||
.mem = text,
|
// Extra +1 to include the null terminator
|
||||||
|
.mem = text.ptr[0 .. text.len + 1],
|
||||||
},
|
},
|
||||||
.tree = tree,
|
.tree = tree,
|
||||||
.document_scope = document_scope,
|
.document_scope = document_scope,
|
||||||
|
Loading…
Reference in New Issue
Block a user