From 5f2496226f81dff9ab1e6455ceb42b3719e6fd4c Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 13 Mar 2024 15:17:21 +0000 Subject: [PATCH] Change `return` to `panic` --- base/runtime/dynamic_map_internal.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/runtime/dynamic_map_internal.odin b/base/runtime/dynamic_map_internal.odin index 49b99d267..642a6fb18 100644 --- a/base/runtime/dynamic_map_internal.odin +++ b/base/runtime/dynamic_map_internal.odin @@ -418,7 +418,7 @@ map_insert_hash_dynamic :: proc "odin" (#no_alias m: ^Raw_Map, #no_alias info: ^ swap_loop: for { if distance > mask { // Failed to find an empty slot and prevent infinite loop - return 0 + panic("unable to insert into a map") } element_hash := hs[pos]