Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/zmac.y
Original file line number Diff line number Diff line change
Expand Up @@ -5661,7 +5661,7 @@ struct item *item_lookup(char *name, struct item *table, int table_size)
while (*p) {
char ch = *p++;
if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A';
hash += hash * 67 + ch - 113;
hash = hash * 67 + ch - 113;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the problem with that hash calculation?

hash %= table_size;
ip = &table[hash];
Expand Down