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 math.randomseed seeding potentially throwing #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Morilli
Copy link

@Morilli Morilli commented Oct 28, 2024

This fixes a potential exception in the math.randomseed() call when os.clock() returns certain values. Using os.time() is the standard method anyways.

Example: For os.clock() == 350.79, math.randomseed(350.79*100000000000) will throw an exception saying bad argument #1 to 'randomseed' (number has no integer representation).

@KeeyanGhoreshi
Copy link
Owner

Thanks, although this seeding has no purpose anymore since the script doesn't use any random values, it's a holdover from the firered code where random delays were added to inputs to help produce different rng outcomes. Rather than fixing it, this line can just be completely removed.

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