gnucash maint: Fix another date test

Geert Janssens gjanssens at code.gnucash.org
Wed Apr 18 13:07:38 EDT 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/451bbd53 (commit)
	from  https://github.com/Gnucash/gnucash/commit/cad6bb42 (commit)



commit 451bbd53d90c7f51846f93912e0dd5016752f999
Author: Geert Janssens <geert at kobaltwit.be>
Date:   Wed Apr 18 19:07:30 2018 +0200

    Fix another date test
    
    This may fix this crasher bug on windows:
    https://bugzilla.gnome.org/show_bug.cgi?id=795040
    However on linux it only fixes a warning so I can't be sure
    until after the next nightly.

diff --git a/libgnucash/engine/qofquerycore.cpp b/libgnucash/engine/qofquerycore.cpp
index bb236d1..991fb52 100644
--- a/libgnucash/engine/qofquerycore.cpp
+++ b/libgnucash/engine/qofquerycore.cpp
@@ -454,7 +454,7 @@ date_to_string (gpointer object, QofParam *getter)
 {
     Timespec ts = ((query_date_getter)getter->param_getfcn)(object, getter);
 
-    if (ts.tv_sec || ts.tv_nsec)
+    if (ts.tv_sec != INT64_MAX)
         return g_strdup (gnc_print_date (ts));
 
     return NULL;



Summary of changes:
 libgnucash/engine/qofquerycore.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-changes mailing list