Merge pull request #2782 from cblichmann-google/master

Use an unsigned pointer compare, as the highest bit may sometimes be set.