gamesys / moonshine

A lightweight Lua VM for the browser
http://moonshinejs.org
MIT License
502 stars 35 forks source link

Fix bug #40: string.sub broken for j=0 or j<i #41

Closed fcr-- closed 7 years ago

paulcuth commented 7 years ago

Hi, This is great, thank you. I don't suppose you could also add the failing examples from the bug report to the test files for sub() in the following file?

https://github.com/gamesys/moonshine/blob/master/test/scripts/lib-string.lua

Many thanks

fcr-- commented 7 years ago

Great! Thank you for the very fast response. I've just added (and tested) the test cases. Hope it works.

PS: I haven't updated the built versions in the repository ("test-package.json", "moonshine{.min}.js").

paulcuth commented 7 years ago

Thank you for this PR. Sorry it took so long to test and resolve.