From f084945e7781f86c5b5cec5ad056888f74724aa7 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Wed, 26 Apr 2000 19:30:37 +0000 Subject: [PATCH] when reading PROP_UNIT, check it's value against the number of built-in 2000-04-26 Michael Natterer * app/xcf.c (xcf_load_image_props): when reading PROP_UNIT, check it's value against the number of built-in units, not against the number of defined units. --- ChangeLog | 6 ++++++ app/xcf.c | 2 +- app/xcf/xcf.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e44c3f7141..5c84cd34d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2000-04-26 Michael Natterer + + * app/xcf.c (xcf_load_image_props): when reading PROP_UNIT, check + it's value against the number of built-in units, not against the + number of defined units. + Wed Apr 26 11:04:12 PDT 2000 Manish Singh * gimptool.in: typo fix diff --git a/app/xcf.c b/app/xcf.c index ca78e028f1..6c910a122b 100644 --- a/app/xcf.c +++ b/app/xcf.c @@ -1923,7 +1923,7 @@ xcf_load_image_props (XcfInfo *info, info->cp += xcf_read_int32 (info->fp, &unit, 1); if ((unit <= GIMP_UNIT_PIXEL) || - (unit >= gimp_unit_get_number_of_units())) + (unit >= gimp_unit_get_number_of_built_in_units())) { g_message ("Warning, unit out of range in XCF file, falling back to inches"); unit = GIMP_UNIT_INCH; diff --git a/app/xcf/xcf.c b/app/xcf/xcf.c index ca78e028f1..6c910a122b 100644 --- a/app/xcf/xcf.c +++ b/app/xcf/xcf.c @@ -1923,7 +1923,7 @@ xcf_load_image_props (XcfInfo *info, info->cp += xcf_read_int32 (info->fp, &unit, 1); if ((unit <= GIMP_UNIT_PIXEL) || - (unit >= gimp_unit_get_number_of_units())) + (unit >= gimp_unit_get_number_of_built_in_units())) { g_message ("Warning, unit out of range in XCF file, falling back to inches"); unit = GIMP_UNIT_INCH;