From e9f59b0fa1e6d9abdc832e241f4f43ac165db554 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 28 Mar 2019 09:47:36 +0100 Subject: migration: check year properly --- migration/migration.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'migration') diff --git a/migration/migration.cpp b/migration/migration.cpp index eda88071..34882390 100644 --- a/migration/migration.cpp +++ b/migration/migration.cpp @@ -50,13 +50,13 @@ void migrator::register_migration(mptr const& m) bool ok = true; + const int year_ = to_int(year, ok), + month_ = to_int(month, ok), + day_ = to_int(day, ok); - const int month_ = to_int(month, ok), day_ = to_int(day, ok); + (void)to_int(serial, ok); - (void) to_int(year, ok); - (void) to_int(serial, ok); - - if (!ok || year < 1970) + if (!ok || year_ < 1970) abort(); if (month_ < 1 || month_ > 12) -- cgit v1.2.3