Fixing a infinite loop issue caused by GCC defaulting char to unsigned int