mirror of https://github.com/GNOME/gimp.git
app: improve error message loading pattern that is too large
As noted in issue #6032 the error message when trying to open a pattern file with dimension larger than supported could be a little clearer. We do this by adding the maximum allowed dimensions to the error message.
This commit is contained in:
parent
f130fe1917
commit
317b5d9cff
|
@ -96,10 +96,11 @@ gimp_pattern_load (GimpContext *context,
|
||||||
(G_MAXSIZE / header.width / header.height / header.bytes < 1))
|
(G_MAXSIZE / header.width / header.height / header.bytes < 1))
|
||||||
{
|
{
|
||||||
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
|
||||||
_("Invalid header data in '%s': width=%lu, height=%lu, "
|
_("Invalid header data in '%s': width=%lu (maximum %lu), "
|
||||||
"bytes=%lu"), gimp_file_get_utf8_name (file),
|
"height=%lu (maximum %lu), bytes=%lu"),
|
||||||
(gulong) header.width,
|
gimp_file_get_utf8_name (file),
|
||||||
(gulong) header.height,
|
(gulong) header.width, (gulong) GIMP_PATTERN_MAX_SIZE,
|
||||||
|
(gulong) header.height, (gulong) GIMP_PATTERN_MAX_SIZE,
|
||||||
(gulong) header.bytes);
|
(gulong) header.bytes);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue