offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
- this[offset] = value
+ this[offset] = (value & 0xff)
return offset + 1
}
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value
+ this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
- this[offset + 1] = value
+ this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
- this[offset] = value
+ this[offset] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, true)
}
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
- this[offset + 3] = value
+ this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
- this[offset] = value
+ this[offset] = (value & 0xff)
return offset + 1
}
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value
+ this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
- this[offset + 1] = value
+ this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
- this[offset] = value
+ this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
- this[offset + 3] = value
+ this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}