aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-26 22:00:12 -0400
committerBrad Lewis <22850972+BradLewis@users.noreply.github.com>2025-07-26 22:00:12 -0400
commitc5a5d2581e30a3d8dcbe2046dc53085a8b88339d (patch)
treebdddc46203636aab8d4987d63dc0f5006a942cb0 /src
parentb9a91fe83b5a908d508f3d958ec65648ede989e5 (diff)
Increase the capacity of the `usings` map so it doesn't cause a panic when trying to insert
Diffstat (limited to 'src')
-rw-r--r--src/server/symbol.odin4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index b4648a6..fa6fbbf 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -231,7 +231,9 @@ symbol_struct_value_builder_make_none :: proc(allocator := context.allocator) ->
ranges = make([dynamic]common.Range, allocator),
docs = make([dynamic]^ast.Comment_Group, allocator),
comments = make([dynamic]^ast.Comment_Group, allocator),
- usings = make(map[int]struct{}, allocator),
+ // Set it to an arbitary size due to issues with crashes
+ // See https://github.com/DanielGavin/ols/issues/787
+ usings = make(map[int]struct{}, 16, allocator),
from_usings = make([dynamic]int, allocator),
unexpanded_usings = make([dynamic]int, allocator),
poly_names = make([dynamic]string, allocator),