fix: guard against null entry array in wrenMapFind for empty maps
Add early return of UINT32_MAX when map capacity is zero in wrenMapFind, preventing a crash from modulo operation on zero during hash index calculation. Includes regression test verifying subscript access on empty map returns null.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// This is a regression test to ensure map handles a null entry array.
|
||||
|
||||
var map = {}
|
||||
IO.print(map["key"]) // expect: null
|
||||
Reference in New Issue
Block a user