when reading PROP_UNIT, check it's value against the number of built-in

2000-04-26  Michael Natterer  <mitch@gimp.org>

	* 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.
This commit is contained in:
Michael Natterer 2000-04-26 19:30:37 +00:00 committed by Michael Natterer
parent 5bca88b5e8
commit f084945e77
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2000-04-26 Michael Natterer <mitch@gimp.org>
* 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 <yosh@gimp.org>
* gimptool.in: typo fix

View File

@ -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;

View File

@ -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;