Closed elisee closed 11 years ago
I forgot to make a new branch rather than committing to master... I added a new commit that fixes os.time to return seconds rather than milliseconds as per http://www.lua.org/manual/5.1/manual.html#5.8
Sorry I didn't get to this sooner. Thanks for both fixes!
No problem, thanks for an awesome library! :) I'm porting the CraftStudio runtime to the Web (http://www.youtube.com/watch?v=TjHSb_XdVKM) and it's been incredibly helpful.
Cool! Glad to see its helping people.
Lua.js uses parseFloat to check whether the operand(s) are numbers or not and if they are not, looks for operator overloading.
But while it checks for null, parseFloat actually returns NaN if the parsing failed see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/parseFloat#Description)
This pull request fixes the checks and make operator overloading actually work.