Skip to content

fix #7#12

Open
Ho-Ro wants to merge 2 commits into
gp48k:masterfrom
Ho-Ro:fix_hash
Open

fix #7#12
Ho-Ro wants to merge 2 commits into
gp48k:masterfrom
Ho-Ro:fix_hash

Conversation

@Ho-Ro

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

Copy link
Copy Markdown

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>
Comment thread src/zmac.y
if (ch >= 'A' && ch <= 'Z') ch += 'a' - 'A';
hash += hash * 67 + ch - 113;
hash = hash * 67 + ch - 113;
}

Copy link
Copy Markdown
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

Ho-Ro commented Oct 23, 2024

Copy link
Copy Markdown
Author

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

mojadita commented Oct 24, 2024 via email

Copy link
Copy Markdown
Collaborator

@aimfiz

aimfiz commented Oct 24, 2024 via email

Copy link
Copy Markdown

@aimfiz

aimfiz commented Oct 24, 2024 via email

Copy link
Copy Markdown

@mojadita

mojadita commented Oct 25, 2024 via email

Copy link
Copy Markdown
Collaborator

gp48k#12 (comment)

Signed-off-by: Martin Homuth-Rosemann <Ho-Ro@users.noreply.github.com>
@Ho-Ro

Ho-Ro commented Apr 11, 2026

Copy link
Copy Markdown
Author

I added the proposal from @aimfiz.
@gp48k and @mojadita - please review and apply.

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