HaxeFoundation / HaxeFoundation/haxe
[python] "<Int32> |= <Int>" not clamping result to 32 bits
Open
platform-cpp
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Code to reproduce:
```haxe
import haxe.Int32;
class Test {
static function main():Void {
var i32:Int32 = 15459750;
var arr:Array = [178,0,0];
var next = 0;
i32 |= (arr[next] << 24);
trace(i32);
}
}
```
Expected: `-1293163098`
Actual: `3001804198`
Tested on haxe 3.4rc, win7 64bit
Notes: works correctly on lua and neko
Contributor guide
Assessment
This issue has not been assessed yet.