[pango] Bug 707131 - getting rid of the arbitrary MAX_SIZE for font.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Bug 707131 - getting rid of the arbitrary MAX_SIZE for font.
- Date: Sat, 31 Aug 2013 01:31:19 +0000 (UTC)
commit e8d1c3f32b38cbd4e39d389ba103af33302bf01a
Author: Jehan <jehan girinstud io>
Date: Sat Aug 31 03:02:41 2013 +1200
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 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index a162f5b..2b2c304 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]