From 5fa0b957dd480a858cebe5ba06a90ccb1bbd4df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Monta=C3=B1ana?= Date: Wed, 20 Sep 2023 19:12:07 +0200 Subject: [PATCH] Fix mistake in idx range in manage --- src/Platform/Results.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Platform/Results.cc b/src/Platform/Results.cc index 47f7725..d03f22e 100644 --- a/src/Platform/Results.cc +++ b/src/Platform/Results.cc @@ -48,6 +48,9 @@ namespace platform { files.push_back(result); } } + if (max == 0) { + max = files.size(); + } } string Result::to_string() const { @@ -164,7 +167,7 @@ namespace platform { if (indexList) { // The value is about the files list index = idx; - if (index >= 0 && index < files.size()) { + if (index >= 0 && index < max) { report(index, false); indexList = false; continue;