ReadyTalk / avian

[INACTIVE] Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java's features, suitable for building self-contained applications.
https://readytalk.github.io/avian/
Other
1.22k stars 172 forks source link

Don't access length field of non-array objects (fixes #486) #487

Closed joshuawarner32 closed 8 years ago

joshuawarner32 commented 8 years ago

This was causing problems in the case that the computed position of the length field was misaligned and we happen to be on an architecture that doesn't allow mis-aligned loads.

The new code should be completely equivalent to the old code, since we would have effectively been multiplying by 0 before (or so I assume...).