@@ 9,8 9,7 @@ fn readuleb128(in: []u8) ((uleb128, size) | partialread) = {
for (let i = 0z; i < len(in); i += 1) {
const byte = in[i];
let bits: uleb128 = byte & 0x7f;
- bits <<= shift;
- result |= bits;
+ result |= bits << shift;
if (byte & 0x80 == 0)
return (result, i+1);
shift += 7;
@@ 29,8 28,7 @@ fn readsleb128(in: []u8) ((sleb128, size) | partialread) = {
const byte = in[i];
let bits: uint = byte & 0x7f;
- bits <<= shift;
- result |= bits;
+ result |= bits << shift;
sign = byte & 0x40;
shift += 7;