dan200 / ComputerCraft

Programmable Computers for Minecraft
Other
981 stars 198 forks source link

[Issue] string.format java.lang.ArrayIndexOutOfBoundsException [1.12.2] #592

Open deltanedas opened 5 years ago

deltanedas commented 5 years ago

Simple Lua code: print(string.format("Test%d", "NotNumber")) In Lua 5.3.3 console: bad argument #2 to 'format' (number expected, got string)

However, in 1.80pr1, it results with: java.lang.ArrayIndexOutOfBoundsException in red.

That shouldn't happen as I doubt any recursion is happening in string.format, as I've seen that is a reason for it to happen in another (fixed) issue.

Please fix up the LuaJ string.format to soft error rather than throw an exception.