Don't message complete GIF data upon errors

* src/image.c (gif_load): When unable to parse a GIF specified
via a data attribute, don't message the complete binary, because
that's not useful (bug#40850).
This commit is contained in:
Lars Ingebrigtsen 2020-07-17 16:01:55 +02:00
parent 02bad11288
commit aa7fe6ce25

View file

@ -8274,7 +8274,10 @@ gif_load (struct frame *f, struct image *img)
rc = DGifSlurp (gif);
if (rc == GIF_ERROR || gif->ImageCount <= 0)
{
image_error ("Error reading `%s'", img->spec);
if (NILP (specified_data))
image_error ("Error reading `%s'", img->spec);
else
image_error ("Error reading GIF data");
gif_close (gif, NULL);
return 0;
}