Fix to undo tautological code

You need to explicitly cast (-1) to be uint8_t or else the compiler will realize that the LHS of the if can never be -1 and will just remove the if statement.