Closed SquidDev closed 8 years ago
Fixed the string.find bug in my LuaJ fork and removed the bios.lua hacks. May merge in the other fixes later.
Fixed the infinite loop, whitespace not matching \v (this is actually caused by a typo in the original code, which i corrected), and the out of bounds exception. I will not be implementing the string.format fixes due to code complexity and relative unimportance.
Awesome! Thanks.
This aren't bugs with ComputerCraft but with LuaJ. I understand that this isn't within the scope of this bug tracker, just thought it might be useful.
string.gmatch
will loop forever on non-consuming patterns (such as\n*
)\011
is not counted as whitespace.string.format
does not pad/truncate on string of floating point format codes (%s
,%f
,%g
, etc...)%b
) throw an out of bounds exception on no matchI've got a set of fixes and test cases if you want to fix/test this. This doesn't correctly handle the
%g
modifier.I've also added a fix for
string.find
returning the wrong index on a previous match (which I guess is what thestring.find
andstring.match
overrides inbios.lua
are for).