Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bank NPC overflow protection being bypassed #4693

Merged
merged 1 commit into from
May 26, 2024

Conversation

glecko
Copy link
Contributor

@glecko glecko commented May 20, 2024

Pull Request Prelude

Changes Proposed

A bank NPC overflow protection was added back in #3522. However (at least with the current LuaJIT version, haven't tested others), tonumber is reserved for (and interpreted as) a standard library basic function.

This change simply renames the variable to avoid the conflict.

As a side note, when testing this (even when the check was being bypassed), I was never able to reproduce any crash, if I said "deposit [number larger than 2^32]" while having that amount of gold in my inventory, the NPC correctly allowed me to deposit & withdraw those amounts. Perhaps the check needs to be removed completly.

Copy link
Member

@ranisalt ranisalt left a comment

Choose a reason for hiding this comment

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

LGTM, just a variable name change to avoid clashing 👍

@EPuncker EPuncker merged commit 33e9698 into otland:master May 26, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants