Cast 0xff to char before comparing it to another char.