cast in comparison because char is unsigned on ARM

Comparison needed a char cast on ARM since char is unsigned