gnucash unstable: Fix timezone constructor crash when zone file has no transitions.
John Ralls
jralls at code.gnucash.org
Mon Dec 18 12:48:44 EST 2017
Updated via https://github.com/Gnucash/gnucash/commit/5af21dfa (commit)
from https://github.com/Gnucash/gnucash/commit/0026b108 (commit)
commit 5af21dfad816a2a41594c02512b1dfc97818f60a
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Dec 18 09:48:17 2017 -0800
Fix timezone constructor crash when zone file has no transitions.
diff --git a/libgnucash/engine/gnc-timezone.cpp b/libgnucash/engine/gnc-timezone.cpp
index 0a26b48..96f164c 100644
--- a/libgnucash/engine/gnc-timezone.cpp
+++ b/libgnucash/engine/gnc-timezone.cpp
@@ -677,8 +677,9 @@ TimeZoneProvider::parse_file(const std::string& tzname)
/* if the transitions end before the end of the zoneinfo coverage
* period then the zone rescinded DST and we need a final no-dstzone.
*/
- if (last_time.is_not_a_date_time() ||
- last_time.date().year() < parser.last_year)
+ if (last_time.is_not_a_date_time())
+ zone_vector.push_back(zone_no_dst(max_year, last_info));
+ else if (last_time.date().year() < parser.last_year)
zone_vector.push_back(zone_no_dst(last_time.date().year(), last_info));
}
Summary of changes:
libgnucash/engine/gnc-timezone.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
More information about the gnucash-changes
mailing list