TIS-3D

TIS-3D

981k Downloads

Illegal color values are not handled gracefully

SanityCh3ck opened this issue ยท 1 comments

commented

... and I have the crash report to prove it:
http://pastebin.com/Db3qHkCf
The following code, given an appropriately placed display module, will crash like that.

MOV 255 UP
MOV 2 UP
MOV 2 UP
MOV 8 UP
MOV 8 UP

I think the problem is

  1. masking the value with 0xFF here and casting it can produce negative byte values. Wouldn't just casting and letting it overflow do the same?
  2. the % operator used here actually being the remainder, not the modulus. This will produce negative results for negative inputs.

I'm using v0.5.0.37 for MC 1.7.10

commented

Ah, yeah, that whole part's a bit... weird. I'll rework that, thanks for letting me know!