[Vm-dev] Suspect code in LittleEndianBitmap
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Sat Nov 2 22:30:49 UTC 2013
In recent COG, I see:
LittleEndianBitmap>>byteAt: byteAddress put: byte
"Insert a byte into a Bitmap (little-endian version). N.B. Signedness
will be lost since byteAt: answers non-negative values.
We can add a signedByteAt: if needed."
| value longWord shift lowBits longAddr |
(byte < 0 or:[byte > 255]) ifTrue:[^self errorImproperStore].
value := byte < 0
ifTrue: [byte < 128 ifTrue:
[self errorImproperStore].
It looks suspect to me, wouldn't the intention be
ifTrue: [byte < -128 ifTrue:
[self errorImproperStore].
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20131102/cab43894/attachment.htm
More information about the Vm-dev
mailing list