Common/FileSystem: Fix a couple of warnings from #2716
This commit is contained in:
parent
e6741dad9b
commit
fca4a2ec28
|
@ -451,7 +451,7 @@ void CanonicalizePath(char* Destination, u32 cbDestination, const char* Path, bo
|
|||
{
|
||||
char prevCh = (i > 0) ? Path[i - 1] : '\0';
|
||||
char currentCh = Path[i];
|
||||
char nextCh = (i < pathLength) ? Path[i + 1] : '\0';
|
||||
char nextCh = (i < (pathLength - 1)) ? Path[i + 1] : '\0';
|
||||
|
||||
if (currentCh == '.')
|
||||
{
|
||||
|
@ -557,8 +557,8 @@ void CanonicalizePath(std::string& path, bool OSPath /*= true*/)
|
|||
|
||||
static inline bool FileSystemCharacterIsSane(char c, bool StripSlashes)
|
||||
{
|
||||
if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9') && c != ' ' && c != ' ' &&
|
||||
c != '_' && c != '-' && c != '.')
|
||||
if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9') && c != ' ' && c != '_' &&
|
||||
c != '-' && c != '.')
|
||||
{
|
||||
if (!StripSlashes && (c == '/' || c == '\\'))
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue