diff --git a/common/ui/file.cpp b/common/ui/file.cpp index 371b76932..2b844481b 100644 --- a/common/ui/file.cpp +++ b/common/ui/file.cpp @@ -41,7 +41,7 @@ static PHYSFSX_counted_list file_getdirlist(const char *dir) { ntstring path; auto dlen = path.copy_if(dir); - if ((!dlen && strlen(dir) > 0) || !path.copy_if(dlen, "/")) + if ((!dlen && dir[0] != '\0') || !path.copy_if(dlen, "/")) return nullptr; ++ dlen; PHYSFSX_counted_list list{PHYSFS_enumerateFiles(dir)};