mozilla/shumway — comment on commit dea2d3475cdf53fa2d2b52b9f44a2fe02b3a94c8
File: src/avm2/avm2.js line 55
By mbebenita:

I changed it so that readU32() calls readS32() and then does a ">>> 0" to get an unsigned value (possibly a double). I'm guessing that readS32() can read 32 bit ints, actually it reads 36 bits and truncates the high 4 bits (5-8) of the 5th byte that is red. The 4th bit of the last byte happens to land on the sign bit of the result. It does indeed seem strange that -1 takes 5 bytes.