noting undefined behavior bug in character comparisons