skip guides with negative positions. Fixes warning since

2003-04-30  Michael Natterer  <mitch@gimp.org>

	* app/xcf/xcf-load.c (xcf_load_image_props): skip guides with
	negative positions. Fixes warning since gimp_image_add_[hv]guide()
	doesn't allow positions < 0 any more.
This commit is contained in:
Michael Natterer 2003-04-30 12:51:11 +00:00 committed by Michael Natterer
parent bf1b054cfe
commit 909a28ced2
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2003-04-30 Michael Natterer <mitch@gimp.org>
* app/xcf/xcf-load.c (xcf_load_image_props): skip guides with
negative positions. Fixes warning since gimp_image_add_[hv]guide()
doesn't allow positions < 0 any more.
2003-04-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpcontainertreeview.c

View File

@ -448,10 +448,12 @@ xcf_load_image_props (XcfInfo *info,
nguides = prop_size / (4 + 1);
for (i = 0; i < nguides; i++)
{
info->cp +=
xcf_read_int32 (info->fp, (guint32 *) &position, 1);
info->cp +=
xcf_read_int8 (info->fp, (guint8 *) &orientation, 1);
info->cp += xcf_read_int32 (info->fp, (guint32 *) &position, 1);
info->cp += xcf_read_int8 (info->fp, (guint8 *) &orientation, 1);
/* skip -1 guides from old XCFs */
if (position < 0)
continue;
switch (orientation)
{