Hi, casting to int in GetIntAt function causes negative values to be read as "bigger positive". Fixed part of code:
public static int GetIntAt(byte[] Buffer, int Pos) { // FIXED: cast to int spoils negative values return (short)((Buffer[Pos] << 8) | Buffer[Pos + 1]); }
Thanks, Łukasz Stefanowicz
Thanks for the fix ;)
Log in to post a comment.
Hi,
casting to int in GetIntAt function causes negative values to be read as "bigger positive".
Fixed part of code:
Thanks,
Łukasz Stefanowicz
Thanks for the fix ;)