From fcc014e5d164674b189a22695f16c7127adce0b2 Mon Sep 17 00:00:00 2001 From: brunoherbelin Date: Sat, 7 Nov 2020 18:36:52 +0100 Subject: [PATCH] compilation warning fix --- Settings.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Settings.cpp b/Settings.cpp index bddbc94..614c86c 100644 --- a/Settings.cpp +++ b/Settings.cpp @@ -431,7 +431,8 @@ void Settings::Lock() FILE *file = fopen(lockfile.c_str(), "r"); int l = 0; if (file) { - fscanf(file, "%d", &l); + if ( fscanf(file, "%d", &l) < 1) + l = 0; fclose(file); }