Fix improper check of dir->path empty string
Some checks failed
CodeQL / Analyze (push) Waiting to run
Build branch / build-all (push) Failing after 14s

This commit is contained in:
smallmodel 2025-02-04 00:08:37 +01:00
parent 8ac186ce17
commit 49335ba8a8
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512

View file

@ -4379,7 +4379,7 @@ void FS_FileTime(const char *filename, char *date, char *size)
// but look through all searchpaths
//ospath = FS_BuildOSPath(fs_homepath->string, fs_gamedir, filename);
for (auto search = fs_searchpaths; search; search = search->next) {
if (search->dir != NULL && search->dir->path != NULL) {
if (search->dir != NULL && search->dir->path[0]) {
ospath = FS_BuildOSPath(search->dir->path, fs_gamedir, filename);
result = stat(ospath, &fileStat);
if (result != -1) {