Skip to content

Commit 5b4a196

Browse files
committed
fix pclose before fgets in init_menu_system
Signed-off-by: Vincent-FK <[email protected]>
1 parent b3ed2c4 commit 5b4a196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/drivers/dingux-sdl/menu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,8 +398,8 @@ void init_menu_system_values(){
398398
brightness_percentage = 50; ///wrong value: setting default to 50
399399
}
400400
else{
401-
pclose(fp);
402401
fgets(res, sizeof(res)-1, fp);
402+
pclose(fp);
403403

404404
/// Check if brightness is a number (at least the first char)
405405
if(res[0] < '0' || res[0] > '9'){

0 commit comments

Comments
 (0)