cast in comparison because char is unsigned on ARM