Works fine on MacOS 26.1.
On Windows 11 Pro 64-bit, it errors with this:
invalid argument #2 to 'random' (interval is empty)
If math.random is meant to fail with very high numbers then that’s fine I suppose. But it should definitely not have different cutoffs depending on which device it’s running on.
Shouldn’t you just raise an error when a higher integer is provided? Instead of making it spontaneously error on hardware that the developer might not even own?