diff --git a/src/scanner.c b/src/scanner.c index c280983..a9979ad 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -521,6 +521,7 @@ unsigned tree_sitter_kotlin_external_scanner_serialize(void *payload, char *buff void tree_sitter_kotlin_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) { Stack *stack = (Stack *)payload; if (length > 0) { + array_reserve(stack, length); memcpy(stack->contents, buffer, length); stack->size = length; } else {