You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix an off-by-one error in the Bytes2Int hook (#4095)
```
jost@freshcode-1:$ kompile test.k
[Warning] Compiler: Could not find main syntax module with name TEST-SYNTAX in
jost@freshcode-1:$ krun -cPGM='Bytes2Int(b"\x00\x80", LE, Signed)'
<k>
-32768 ~> .K
</k>
jost@freshcode-1:$ kompile test.k --backend haskell
[Warning] Compiler: Could not find main syntax module with name TEST-SYNTAX in
definition. Use --syntax-module to specify one. Using TEST as default.
jost@freshcode-1:$ krun -cPGM='Bytes2Int(b"\x00\x80", LE, Signed)'
<k>
32768 ~> .K
</k>
```
32768 is not representable in 16 bit signed integers.
Root cause was a missing `=` , tests did not catch it because they
applied the same (wrong) logic as the conversion itself.
0 commit comments