comparison src/core/sys.c @ 87:ebbf35d90088

misc: fix several portability issues
author David Demelier <markand@malikania.fr>
date Wed, 11 Mar 2020 20:36:10 +0100
parents a6c2067709ce
children 58133933ea17
comparison
equal deleted inserted replaced
86:42fef6046300 87:ebbf35d90088
159 { 159 {
160 static char path[PATH_MAX]; 160 static char path[PATH_MAX];
161 char *pref; 161 char *pref;
162 162
163 if ((pref = SDL_GetPrefPath("malikania", "molko"))) { 163 if ((pref = SDL_GetPrefPath("malikania", "molko"))) {
164 snprintf(path, sizeof (path), "%ssave-%u", idx); 164 snprintf(path, sizeof (path), "%ssave-%u", pref, idx);
165 SDL_free(pref); 165 SDL_free(pref);
166 } else 166 } else
167 snprintf(path, sizeof (path), "save-%u", idx); 167 snprintf(path, sizeof (path), "save-%u", idx);
168 168
169 return path; 169 return path;