summaryrefslogtreecommitdiff
path: root/pango/pango-markup.c
diff options
context:
space:
mode:
authorJehan <jehan@girinstud.io>2013-08-31 03:02:41 +1200
committerJehan <jehan@girinstud.io>2013-08-31 13:26:42 +1200
commite8d1c3f32b38cbd4e39d389ba103af33302bf01a (patch)
treecba25537f2480d1a0368c05af56239840e3e0585 /pango/pango-markup.c
parent14b0697a59f51dd017038ca2bb79ba2c2f4034df (diff)
downloadpango-e8d1c3f32b38cbd4e39d389ba103af33302bf01a.tar.gz
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.
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r--pango/pango-markup.c11
1 files 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 <span> 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;
}