readPackedIntBig
reads from end of array
#19953
Labels
bug
Observed behavior contradicts documented or intended behavior
standard library
This issue involves writing Zig code for the standard library.
Milestone
Zig Version
0.13.0-dev.73+db890dbae
Steps to Reproduce and Observed Behavior
Godbolt: https://godbolt.org/z/EK87ob593
It reads the last 4 bytes and returns
0x00020301
.Expected Behavior
I was expecting this to read the first 4 bytes of the slice as big-endian (
0x00000001
), but it seems that this function reads from the back of the array instead.I've pinpointed the cause to here.
The text was updated successfully, but these errors were encountered: