A typo
V501 There are identical sub-expressions to the left and to the right of the ‘||’ operator: !s[1] ||!s[2] ||!s[1] graphics.cpp 829
void Graphics::textsize(const char* s, int& width, int& height) { .... else if (*s == '\x0F') { if(!s[1] || !s[2] || !s[1]) break; s+=3; } .... }
At a certain condition, a series of three items of an array of characters are to be checked, but because of a typo, item s[3] can’t be checked, which is probably the reason for the program’s incorrect behavior in certain situations.
Please click here to see more bugs from this project.