[gimp] app: improve error message loading pattern that is too large
- From: Jacob Boerema <jboerema src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: improve error message loading pattern that is too large
- Date: Mon, 9 Aug 2021 22:14:24 +0000 (UTC)
commit 317b5d9cff14a647034910d035f8bb9f0c36080c
Author: Jacob Boerema <jgboerema gmail com>
Date: Mon Aug 9 18:08:33 2021 -0400
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.
app/core/gimppattern-load.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimppattern-load.c b/app/core/gimppattern-load.c
index e163598c1a..27f057f8de 100644
--- a/app/core/gimppattern-load.c
+++ b/app/core/gimppattern-load.c
@@ -96,10 +96,11 @@ gimp_pattern_load (GimpContext *context,
(G_MAXSIZE / header.width / header.height / header.bytes < 1))
{
g_set_error (error, GIMP_DATA_ERROR, GIMP_DATA_ERROR_READ,
- _("Invalid header data in '%s': width=%lu, height=%lu, "
- "bytes=%lu"), gimp_file_get_utf8_name (file),
- (gulong) header.width,
- (gulong) header.height,
+ _("Invalid header data in '%s': width=%lu (maximum %lu), "
+ "height=%lu (maximum %lu), bytes=%lu"),
+ gimp_file_get_utf8_name (file),
+ (gulong) header.width, (gulong) GIMP_PATTERN_MAX_SIZE,
+ (gulong) header.height, (gulong) GIMP_PATTERN_MAX_SIZE,
(gulong) header.bytes);
goto error;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]