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

Allow for item drop rates up to 255 #7533

Merged
merged 2 commits into from
Nov 12, 2024

Conversation

ephphatha
Copy link
Contributor

Bit of an experiment, this does include a behaviour change/fix. If the RNG seed lines up that the call to GenerateRnd returned a negative value it previously would've read out-of-bounds and returned that value as an item index, leading to further out-of-bounds reads in GetItemAttrs.

Apart from that behaviour should be exactly the same. The timedemo still passes at least :D

Source/itemdat.cpp Outdated Show resolved Hide resolved
@AJenbo AJenbo merged commit 1412e25 into diasurgical:master Nov 12, 2024
23 checks passed
@ephphatha ephphatha deleted the item/drop_rate branch November 12, 2024 12:39
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.

2 participants