diff --git a/src/backends/unix/system.c b/src/backends/unix/system.c index 9d55251f..25657466 100644 --- a/src/backends/unix/system.c +++ b/src/backends/unix/system.c @@ -496,6 +496,7 @@ Sys_Rename(const char *from, const char *to) void Sys_RemoveDir(const char *path) { + char filepath[MAX_OSPATH]; DIR *directory = opendir(path); struct dirent *file; @@ -503,11 +504,11 @@ Sys_RemoveDir(const char *path) { while ((file = readdir(directory)) != NULL) { - Sys_Remove(va("%s%s", path, file->d_name)); + sprintf(filepath, "%s/%s", path, file->d_name); + Sys_Remove(filepath); } closedir(directory); - Sys_Remove(path); } } diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c index 65e14d90..181f125b 100644 --- a/src/client/menu/menu.c +++ b/src/client/menu/menu.c @@ -2408,7 +2408,7 @@ LoadGame_MenuKey(int key) case K_DEL: - if ((item = Menu_ItemAtCursor(m)) != 0) + if ((item = Menu_ItemAtCursor(m)) != NULL) { if (item->type == MTYPE_ACTION) { @@ -2539,7 +2539,7 @@ SaveGame_MenuKey(int key) case K_DEL: - if ((item = Menu_ItemAtCursor(m)) != 0) + if ((item = Menu_ItemAtCursor(m)) != NULL) { if (item->type == MTYPE_ACTION) { diff --git a/src/common/filesystem.c b/src/common/filesystem.c index c46c2d0c..17069ae4 100644 --- a/src/common/filesystem.c +++ b/src/common/filesystem.c @@ -1504,7 +1504,7 @@ void FS_BuildGenericSearchPath(void) { fsRawPath_t *search = fs_rawPath; while (search != NULL) { - Com_sprintf(path, sizeof(path), "%s%s", search->path, BASEDIRNAME); + Com_sprintf(path, sizeof(path), "%s/%s", search->path, BASEDIRNAME); FS_AddDirToSearchPath(path, search->create); search = search->next;