From 1f14d0f6296e69ace72ccc9f7042f89d74a16e55 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sat, 9 Jun 2018 15:04:27 +0100 Subject: [PATCH] In qof_scan_date returns valid date when day and month are 0 If you start typing a date in the register with the enable autoreadonly option starting with a 0, gdate complains when trying to create a valid date. --- libgnucash/engine/gnc-date.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp index edd6eac9b8..3107f1a311 100644 --- a/libgnucash/engine/gnc-date.cpp +++ b/libgnucash/engine/gnc-date.cpp @@ -936,6 +936,9 @@ qof_scan_date_internal (const char *buff, int *day, int *month, int *year, g_free (dupe); + if ((imonth == 0) || (iday == 0)) + return FALSE; + if ((12 < imonth) || (31 < iday)) { /*