gamesys / moonshine

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

string.sub broken for j=0 or j<i #40

Open fcr-- opened 7 years ago

fcr-- commented 7 years ago

string.sub('abcde', 4, 1) should be an empty string, not 'bc'. string.sub('abcde', 3, 0) should be an empty string, not 'cde'.

bmcbarron commented 7 years ago

This appears to be fixed on master, although moonshine.js and moonshine.min.js were not rebuilt in that CL. PR #46 includes a rebuild that incorporates those fixes.