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).
This commit is contained in:
parent
003560e00d
commit
63a04d14e5
@ -1084,6 +1084,9 @@ bool ESmry::make_esmry_file()
|
|||||||
|
|
||||||
{
|
{
|
||||||
std::vector<int> start_date_vect = start_vect;
|
std::vector<int> start_date_vect = start_vect;
|
||||||
|
if (start_date_vect.size() < 6) {
|
||||||
|
start_date_vect.resize(6);
|
||||||
|
}
|
||||||
|
|
||||||
int sec = start_date_vect[5] / 1000000;
|
int sec = start_date_vect[5] / 1000000;
|
||||||
int millisec = (start_date_vect[5] % 1000000) / 1000;
|
int millisec = (start_date_vect[5] % 1000000) / 1000;
|
||||||
|
Loading…
Reference in New Issue
Block a user