fix: guard string hash loop against zero-length strings causing division by zero

This commit is contained in:
Bob Nystrom
2015-03-17 14:00:54 +00:00
parent 76baf731db
commit f6da4700f4
2 changed files with 12 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
var map = {
"": "empty string"
}
IO.print(map[""]) // expect: empty string