Skip to content

Commit 343ad3e

Browse files
committed
ngage: SDL_GetPrefPath allows a NULL org parameter.
Reference Issue #13322.
1 parent ecdc6f2 commit 343ad3e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/filesystem/ngage/SDL_sysfilesystem.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ char *SDL_SYS_GetBasePath(void)
3232

3333
char *SDL_SYS_GetPrefPath(const char *org, const char *app)
3434
{
35-
char *pref_path;
36-
if (SDL_asprintf(&pref_path, "C:/System/Apps/%s/%s/", org, app) < 0)
35+
char *pref_path = NULL;
36+
if (SDL_asprintf(&pref_path, "C:/System/Apps/%s/%s/", org ? org : "SDL_App", app) < 0) {
3737
return NULL;
38-
else
39-
return pref_path;
38+
}
39+
return pref_path;
4040
}
4141

4242
char *SDL_SYS_GetUserFolder(SDL_Folder folder)

0 commit comments

Comments
 (0)