Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CString CPathUtils::PathUnescape (const char* path)
- {
- // try quick path
- size_t i = 0;
- for (; char c = path[i]; ++i)
- if ((c >= 0x80) || (c == '%'))
- {
- // quick path does not work for
- // non-latin or escaped chars
- std::string utf8Path (path);
- CPathUtils::Unescape (&utf8Path[0]);
- return CUnicodeUtils::UTF8ToUTF16 (utf8Path);
- }
- ...
- }
- This suspicious code was found in TortoiseSVN project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'c >= 0x80' is always false. The value range of signed char type: [-128, 127]. pathutils.cpp 559
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement