The optimizer was folding the entire function to return 0. This
meant to be checking the character content of the pointer is the
string terminator, not null.
Not sure if the null checks are necessary. I'm not sure what
the spec is for these, or why these would even be exposed.