app: fix legacy .gpb parsing code in gimp_brush_load_brush()

Only seek back to after the end of the actual brush if a following
pattern was *not* found. Got this logic wrong in the original port of
the plug-in code.
This commit is contained in:
Michael Natterer 2019-04-09 23:11:55 +02:00
parent 9fd8d65f98
commit 40863bffdd
1 changed files with 10 additions and 7 deletions

View File

@ -348,11 +348,14 @@ gimp_brush_load_brush (GimpContext *context,
error) && error) &&
bytes_read == pixmap_size); bytes_read == pixmap_size);
} }
else
{
/* seek back if pattern wasn't found */
success = g_seekable_seek (G_SEEKABLE (input),
rewind, G_SEEK_SET,
NULL, error);
}
} }
/* seek back unconditionally */
g_seekable_seek (G_SEEKABLE (input), rewind, G_SEEK_SET,
NULL, NULL);
} }
break; break;