Reapply Derek's fix for a crash when opening the Pref's dialog when

using guile-1.6.1.  Lost when converting to the scheme scm_xxx
 interface.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8078 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton
2003-03-14 06:02:49 +00:00
parent 3ff79110e7
commit 60a5555f59
2 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,10 @@
2003-03-13 David Hampton <hampton@employees.org>
* src/app-utils/option-util.c (gnc_option_get_range_info): Reapply
Derek's fix for a crash when opening the Pref's dialog when using
guile-1.6.1. Lost when converting to the scheme scm_xxx
interface.
2003-03-13 Derek Atkins <derek@ihtfp.com>
* src/engine/Makefile.am: make sure to add INTLLIBS in case

View File

@@ -1123,8 +1123,13 @@ gboolean gnc_option_get_range_info(GNCOption *option,
if (!SCM_NUMBERP(value))
return FALSE;
if (num_decimals != NULL)
*num_decimals = scm_num2int(value, SCM_ARG1, __FUNCTION__);
/* Guile-1.6 returns this as a double, so let's use that in all cases.
* This is still safe for earlier guiles, too -- tested with 1.3.4.
*/
if (num_decimals != NULL) {
double decimals = scm_num2dbl(value, __FUNCTION__);
*num_decimals = (int)decimals;
}
if (!SCM_LISTP(list) || SCM_NULLP(list))
return FALSE;