Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static int _FAT_directory_lfnLength (const char* name) {
- ...
- for (i = 0; i < nameLength; i++) {
- if (name[i] < 0x20 || name[i] >= ABOVE_UCS_RANGE) {
- return -1;
- }
- }
- ...
- }
- This is what should have been written here: (unsigned char)(name[i]) >= ABOVE_UCS_RANGE
- This suspicious code was found in DeSmuME project by PVS-Studio static code analyzer.
- Warning message is:
- V547 Expression 'name[i] >= 0xF0' is always false. The value range of signed char type: [-128, 127]. DeSmuME_VS2005 directory.cpp 118
- 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