aboutsummaryrefslogtreecommitdiff
path: root/src/server/requests.odin
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2020-11-29 19:25:15 +0100
committerDanielGavin <danielgavin5@hotmail.com>2020-11-29 19:25:15 +0100
commit0a49dec8e063d44b86c8c28bf77dbde17cdb35c8 (patch)
treedb86b6e300135df3474eda8625f5f957c7a86a2f /src/server/requests.odin
parent1b1860976d0a4ab6e23601c714df3f86f39e5691 (diff)
added sha1, fixed leaks, fixed crash on bad expr
Diffstat (limited to 'src/server/requests.odin')
-rw-r--r--src/server/requests.odin5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/server/requests.odin b/src/server/requests.odin
index 4eed483..149ea3a 100644
--- a/src/server/requests.odin
+++ b/src/server/requests.odin
@@ -269,8 +269,8 @@ request_initialize :: proc(params: json.Value, id: RequestId, config: ^common.Co
token_type := type_info_of(SemanticTokenTypes).variant.(runtime.Type_Info_Named).base.variant.(runtime.Type_Info_Enum);
token_modifier := type_info_of(SemanticTokenModifiers).variant.(runtime.Type_Info_Named).base.variant.(runtime.Type_Info_Enum);
- token_types := make([] string, len(token_type.names));
- token_modifiers := make([] string, len(token_modifier.names));
+ token_types := make([] string, len(token_type.names), context.temp_allocator);
+ token_modifiers := make([] string, len(token_modifier.names), context.temp_allocator);
for name, i in token_type.names {
token_types[i] = strings.to_lower(name, context.temp_allocator);
@@ -350,7 +350,6 @@ request_definition :: proc(params: json.Value, id: RequestId, config: ^common.Co
return .ParseError;
}
-
document := document_get(definition_params.textDocument.uri);
if document == nil {