diff --git a/frontend/menu.c b/frontend/menu.c index d89202482..0b4e2c170 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -488,8 +488,8 @@ void init_menu_system_values(){ volume_percentage = 50; ///wrong value: setting default to 50 } else{ - pclose(fp); fgets(res, sizeof(res)-1, fp); + pclose(fp); /// Check if Volume is a number (at least the first char) if(res[0] < '0' || res[0] > '9'){ @@ -509,8 +509,8 @@ void init_menu_system_values(){ brightness_percentage = 50; ///wrong value: setting default to 50 } else{ - pclose(fp); fgets(res, sizeof(res)-1, fp); + pclose(fp); /// Check if brightness is a number (at least the first char) if(res[0] < '0' || res[0] > '9'){