[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Incomplete implementation of `asByteArray` for negative numbers? (#324)
Maxim V
notifications at github.com
Wed Dec 19 14:56:21 UTC 2018
Hi, I found this why implementing a binary protocol - negative numbers are encoded in the same way as positive:
```
10 asByteArray = (-10 asByteArray) . " => true"
```
While (usually) that's not the case and `bitString` shows it as well:
```
10 bitString = (-10 bitString ). " => false"
```
I suggest that `-10 asByteArray` result is same as bitstring represented in bytes, as well as `asByteArrayOfSize:`.
What do you think?
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/324
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181219/480d2981/attachment-0001.html>
More information about the Vm-dev
mailing list