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
If you try to read large negative numbers, like -11 678 001, you got 1 062 063 823 instead. To fix this, replace the RKNum struct's number() method to this one:
The problem here, that there is an undocumented sign handling by Microsoft, that you must take into consideration. After you convert the number to an uint32, you must check the original number's leftmost bit, and if its one, then you must OR your number with 0xC0000000 to make the overflowing 32 bit uint into a signed 32 bit int. Then you can convert this into a 64bit signed int.
The text was updated successfully, but these errors were encountered:
If you try to read large negative numbers, like
-11 678 001
, you got1 062 063 823
instead. To fix this, replace theRKNum
struct's number() method to this one:The problem here, that there is an undocumented sign handling by Microsoft, that you must take into consideration. After you convert the number to an uint32, you must check the original number's leftmost bit, and if its one, then you must OR your number with 0xC0000000 to make the overflowing 32 bit uint into a signed 32 bit int. Then you can convert this into a 64bit signed int.
The text was updated successfully, but these errors were encountered: