mirror of https://github.com/GNOME/gimp.git
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:
parent
9fd8d65f98
commit
40863bffdd
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue