Don't skip invalid enum values in schemas

Signed-off-by: Maks Naumov <maksqwe1@ukr.net>

https://bugzilla.gnome.org/show_bug.cgi?id=742997
This commit is contained in:
Maks Naumov
2015-01-15 14:33:17 -08:00
committed by Philip Withnall
parent 30b25a6fd9
commit 12e32e96a3
3 changed files with 13 additions and 2 deletions

View File

@@ -97,9 +97,9 @@ enum_state_add_value (EnumState *state,
}
value = g_ascii_strtoll (valuestr, &end, 0);
if (*end || state->is_flags ?
if (*end || (state->is_flags ?
(value > G_MAXUINT32 || value < 0) :
(value > G_MAXINT32 || value < G_MININT32))
(value > G_MAXINT32 || value < G_MININT32)))
{
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,