Skip to content

fix #7#12

Open
Ho-Ro wants to merge 1 commit intogp48k:masterfrom
Ho-Ro:fix_hash
Open

fix #7#12
Ho-Ro wants to merge 1 commit intogp48k:masterfrom
Ho-Ro:fix_hash

Conversation

@Ho-Ro
Copy link

@Ho-Ro Ho-Ro commented Oct 19, 2024

I've implemented the proposed fix for #7 in my fork, maybe you want to pull it too.

Signed-off-by: Martin <Ho-Ro@users.noreply.github.com>
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?

@Ho-Ro
Copy link
Author

Ho-Ro commented Oct 23, 2024

I stumbled over the issue #7 reported by @aimfiz who spotted a weakness (just a weakness, not a problem) in the hash calculation that I fixed for my local build. I've provided the simple change as a PR in case you want to use it. Feel free to reject it.

@mojadita
Copy link
Collaborator

mojadita commented Oct 24, 2024 via email

@aimfiz
Copy link

aimfiz commented Oct 24, 2024 via email

@aimfiz
Copy link

aimfiz commented Oct 24, 2024 via email

@mojadita
Copy link
Collaborator

mojadita commented Oct 25, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants