From 63a04d14e53e5c7023baf59f1da50581cc663c00 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 17 Nov 2023 12:37:05 +0100 Subject: [PATCH] fixed: make sure vector has expected size this comes from input that can be shorter (e.g. in the test it only holds day-month-year). --- src/opm/io/eclipse/ESmry.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/opm/io/eclipse/ESmry.cpp b/src/opm/io/eclipse/ESmry.cpp index 29616d037..a0fbfc310 100644 --- a/src/opm/io/eclipse/ESmry.cpp +++ b/src/opm/io/eclipse/ESmry.cpp @@ -1084,6 +1084,9 @@ bool ESmry::make_esmry_file() { std::vector start_date_vect = start_vect; + if (start_date_vect.size() < 6) { + start_date_vect.resize(6); + } int sec = start_date_vect[5] / 1000000; int millisec = (start_date_vect[5] % 1000000) / 1000;