From 2bcb9bb1a5fa6e2f821836e58b201791e773b032 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Thu, 29 Aug 2019 11:28:18 +0100 Subject: [PATCH] Test for Invoices XML dates not being INT64_MAX To prevent errors being logged to the trace file when invoices are saved test for the date values not being INT64_MAX which is an unset date. --- libgnucash/backend/xml/gnc-invoice-xml-v2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp index b2f45f51f3..4bb9ec0829 100644 --- a/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp +++ b/libgnucash/backend/xml/gnc-invoice-xml-v2.cpp @@ -83,7 +83,7 @@ maybe_add_string (xmlNodePtr ptr, const char* tag, const char* str) static void maybe_add_time64 (xmlNodePtr ptr, const char* tag, time64 time) { - if (time) + if (time != INT64_MAX) xmlAddChild (ptr, time64_to_dom_tree (tag, time)); }