Skip to content

Apply #2507 bounds checks to RandomGenerator():random() and :irandom()#2863

Merged
daid merged 2 commits intodaid:masterfrom
oznogon:fix-randomgenerator-bounds
Apr 17, 2026
Merged

Apply #2507 bounds checks to RandomGenerator():random() and :irandom()#2863
daid merged 2 commits intodaid:masterfrom
oznogon:fix-randomgenerator-bounds

Conversation

@oznogon
Copy link
Copy Markdown
Contributor

@oznogon oznogon commented Apr 16, 2026

PR #2507 added standalone random() and irandom() Lua global functions with bounds checks, but didn't add bounds checks to RandomGenerator():random() and RandomGenerator():irandom().

Align RandomGenerator() behavior to the standalone functions'.

Not sure if there was a reason for this omission, cc @GinjaNinja32

@GinjaNinja32
Copy link
Copy Markdown
Contributor

the reason: I forgot RandomGenerator got added and the scenarios I was checking either didn't use it or used it correctly 😆

@daid daid merged commit 65350c1 into daid:master Apr 17, 2026
5 checks passed
@oznogon oznogon deleted the fix-randomgenerator-bounds branch April 17, 2026 19:36
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