Fix mistake in idx range in manage

This commit is contained in:
Ricardo Montañana Gómez 2023-09-20 19:12:07 +02:00
parent 67252fc41d
commit 5fa0b957dd
Signed by: rmontanana
GPG Key ID: 46064262FD9A7ADE

View File

@ -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;