gnucash stable: Bug 799039 - gnc:strify produces unusual results or crashes GnuCash when fed an option from gnc-lookup-option
Christopher Lam
clam at code.gnucash.org
Mon Jul 24 05:01:51 EDT 2023
Updated via https://github.com/Gnucash/gnucash/commit/73a78f70 (commit)
from https://github.com/Gnucash/gnucash/commit/867867da (commit)
commit 73a78f7072f13d8957950e3b1a96a1d034c76b01
Author: Christopher Lam <christopher.lck at gmail.com>
Date: Mon Jul 24 16:34:15 2023 +0800
Bug 799039 - gnc:strify produces unusual results or crashes GnuCash when fed an option from gnc-lookup-option
gnc:strify can now describe options.
diff --git a/gnucash/report/report-utilities.scm b/gnucash/report/report-utilities.scm
index d5eb27693b..292773e029 100644
--- a/gnucash/report/report-utilities.scm
+++ b/gnucash/report/report-utilities.scm
@@ -1080,6 +1080,10 @@
(map gnc:strify (coll 'format gnc:make-gnc-monetary #f))))
(define (value-collector->str coll)
(format #f "coll<~a>" (coll 'total #f)))
+ (define (option-get-description option)
+ (format #f "Option<~a/~a>"
+ (GncOption-get-section option)
+ (GncOption-get-name option)))
(define (procedure->str proc)
(format #f "Proc<~a>"
(or (procedure-name proc) "unk")))
@@ -1141,6 +1145,7 @@
(if (eq? (car d) 'absolute)
(qof-print-date (cdr d))
(gnc:strify (cdr d)))))
+ (try option-get-description)
(try monetary-collector->str)
(try value-collector->str)
(try procedure->str)
Summary of changes:
gnucash/report/report-utilities.scm | 5 +++++
1 file changed, 5 insertions(+)
More information about the gnucash-changes
mailing list