June 23, 2017
11:19 a.m.
https://pharo.fogbugz.com/f/cases/20176/Error-in-ByteArray-booleanAt 2017-06-22 17:39 GMT+02:00 Raffaello Giulietti < raffaello.giulietti@lifeware.ch>:
Hi,
the current (Pharo 6) code reads
^(self integerAt: byteOffset size: 1 signed: false) == true
so it always returns false, as no integer is identical to true.
Instead, it should read
^(self integerAt: byteOffset size: 1 signed: false) ~= 0
implementing the usual convention that 0 maps to false and every other value maps to true.
Greetings Raffaello