HaxeFoundation / HaxeFoundation/haxe

[ JS ] Wrong value for byte (0xFF) when increment

Open
#9,415 11 comments 0 reactions 0 assignees View on GitHub
bug feature-analyzer
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The following example will return 0 for eval, hashlink, java , but 256 for javascript
```haxe
var key = haxe.io.Bytes.ofHex('b5cb4d8dd2c2fc705e10a825000043ff');
key.set(15, key.get(15) + 1);
trace(key.get(15));
```
This will take 0xFF ( last byte from ```key``` and will add +1 . Result should be 0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.