X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=file.c;h=18193b2346514067d9e66457530b42af16678f1c;hp=57cfc56df1a3cf87a14bb231a8ff766e2c7e2ca8;hb=9f0bc6ef9620912ca42eca9c3f4b6ca10dba35ce;hpb=e10d6c0b95e2f4fe7acd75733370dae71bb3b73f diff --git a/file.c b/file.c index 57cfc56..18193b2 100644 --- a/file.c +++ b/file.c @@ -82,7 +82,10 @@ find_score_file(void) { g_score_file = add_path("scores"); g_score_mode = 0111; - if(is_file(g_score_file)) return true; + if(is_file(g_score_file)) { + g_score_file = strdup(g_score_file); + return true; + } g_score_file = malloc(MAX_PATH_LEN); snprintf(g_score_file, MAX_PATH_LEN,