ArrayIndexOutOfBoundsException with > 16 methods
desht opened this issue ยท 3 comments
Useful information to include:
- Minecraft version
- CC: Tweaked version
- Detailed reproduction steps: sometimes I can spot a bug pretty easily, but often it's much more obscure. The more information I have to help reproduce it, the quicker it'll get fixed.
CC: Tweaked version: 1.88.0
MC Version: 1.15.2
Got the following exception with a tile entity of mine which offers 52 Lua methods: https://pastebin.com/N7QFY0MT
Looking at dan200.computercraft.core.asm.IntCache
, it seems only 16 entries are allocated in the cache? Is there a hard limit of 16 methods? This wasn't the case in 1.12.2.
Ahh, I'm a muppet. It's meant to correctly adjust for larger values, but there's a whole bunch of off-by-one errors in the code. Knew I should have written a unit test for this.