From e8d1c3f32b38cbd4e39d389ba103af33302bf01a Mon Sep 17 00:00:00 2001 From: Jehan Date: Sat, 31 Aug 2013 03:02:41 +1200 Subject: Bug 707131 - getting rid of the arbitrary MAX_SIZE for font. Since the value is stored as an int, no reason to use any other value than INT_MAX. --- pango/pango-markup.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/pango/pango-markup.c b/pango/pango-markup.c index a162f5bf..2b2c3047 100644 --- a/pango/pango-markup.c +++ b/pango/pango-markup.c @@ -1190,18 +1190,15 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED, const char *end; gint n; -/* cap size from the top at an arbitrary 2048 */ -#define MAX_SIZE (2048 * PANGO_SCALE) - - if ((end = size, !pango_scan_int (&end, &n)) || *end != '\0' || n < 0 || n > MAX_SIZE) + if ((end = size, !pango_scan_int (&end, &n)) || *end != '\0' || n < 0 || n > INT_MAX) { g_set_error (error, G_MARKUP_ERROR, G_MARKUP_ERROR_INVALID_CONTENT, _("Value of 'size' attribute on tag on line %d " - "could not be parsed; should be an integer less than %d, or a " - "string such as 'small', not '%s'"), - line_number, MAX_SIZE+1, size); + "could not be parsed; should be an integer no more than %d," + " or a string such as 'small', not '%s'"), + line_number, INT_MAX, size); goto error; } -- cgit v1.2.1