Closed GoogleCodeExporter closed 8 years ago
It seems that if I change the length variable in the EOF_NOTE structure
definition back to long instead of unsigned long, the preview works again.
However, it might be best to ensure that lengths are unsigned because
logically, they cannot be negative.
Original comment by raynebc
on 29 Nov 2010 at 5:30
[deleted comment]
The problem ends up being in this line:
if(npos + np->length / eof_zoom_3d < -100)
In this case, npos is a signed integer type, and np->length is an unsigned
integer type. The resulting unsigned value is compared against -100, which is
a very large number when interpreted as unsigned, causing the statement to
register as TRUE.
Original comment by raynebc
on 29 Nov 2010 at 5:39
Fixed in r602. For now, it looks like the note length will have to remain a
signed value. The only way to change that would be to redesign the screen
coordinate mapping logic, which is designed to use signed numbers. That may
not be a worthwhile endeavor.
Original comment by raynebc
on 29 Nov 2010 at 5:53
Original issue reported on code.google.com by
raynebc
on 27 Nov 2010 at 9:19