Do not use g_return_val_if_fail() in sub_pattern_to_int(), no number is not an error
parent
b5825f26a1
commit
120f8ba116
|
@ -2121,7 +2121,9 @@ sub_pattern_to_int (const gchar *name)
|
|||
errno = 0;
|
||||
number = g_ascii_strtoull (name, &end_name, 10);
|
||||
|
||||
g_return_val_if_fail (!errno && number < G_MAXINT && !*end_name, -1);
|
||||
if (errno !=0 || number > G_MAXINT || *end_name != 0)
|
||||
return -1;
|
||||
|
||||
return number;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue