diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-04 11:54:16 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-04 11:55:49 +1000 |
commit | 24e4656be7105e090e2f1a76a294daf2d9c293af (patch) | |
tree | 92d92591e70766bfd962e5e8f95300fad59a024c /src/lmathlib.js | |
parent | adb15f3073139981fa38ed61587513a92065cf03 (diff) | |
download | fengari-24e4656be7105e090e2f1a76a294daf2d9c293af.tar.gz fengari-24e4656be7105e090e2f1a76a294daf2d9c293af.tar.bz2 fengari-24e4656be7105e090e2f1a76a294daf2d9c293af.zip |
Add more/correct validation around integers
Diffstat (limited to 'src/lmathlib.js')
-rw-r--r-- | src/lmathlib.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lmathlib.js b/src/lmathlib.js index 7d3a082..8c7b8a5 100644 --- a/src/lmathlib.js +++ b/src/lmathlib.js @@ -39,7 +39,7 @@ const math_random = function(L) { lua.to_luastring("interval too large", true)); r *= (up - low) + 1; - lua.lua_pushinteger(L, r + low); + lua.lua_pushinteger(L, Math.floor(r) + low); return 1; }; |