Got bitten by the char arithmetics in C today, while porting some native code to Android NDK.
Good reminder that the chars are not defined as signed or unsigned in the C standard and treated as unsigned by the ARM compiler for example.
To fix this problem it's better to use either something like int8_t from stdint.h or the compiler flag:
-funsigned-char
Good luck!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment