X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=file.c;h=18193b2346514067d9e66457530b42af16678f1c;hp=57cfc56df1a3cf87a14bb231a8ff766e2c7e2ca8;hb=232d1b5f32a2d72f4d3fe7326f942bb7887a7f40;hpb=f8a1bfd0744369a492554476fd8a57484c581a5b 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,