v.drawNum doesn't work with large numbers

Status
Not open for further replies.
Congratulations! You've discovered the fact that abs(-2147483648) doesn't work!
 
The funny thing about this is that v.drawNum is the one that's supposed to support negative numbers =V Though yeah, because abs is used on the number internally when the function is called in Lua, you have ...problems.

Those "random" symbols IIRC come from the fact they come before the array for that particular number font in memory. So the actual C version of v.drawNum actually goes backwards into that part of the memory when it decides the graphic drawn for each digit when you have -2147483648, since the - is never cropped off as planned. Of course I could be totally wrong about this.
 
Last edited:
Status
Not open for further replies.

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top