{
uint32_t num;
- num = 0;
- while (**str != '\0') {
- if (**str < '0' || **str > '9')
- break;
-
- num = num*10 + (**str - '0');
- (*str)++;
- }
+ if (str_parse_uint32(*str, &num, str) < 0)
+ return 0;
if (num == (uint32_t)-1) {
/* FIXME: ugly hack, we're using this number to mean the
with uidsets ending with comma. */
{ "1,2,", "1:2", 0 },
{ "4294967296", "", -1 },
+ { "4294967297", "", -1 },
{ "4294967295", "4294967294", 0 },
{ "4294967294:4294967295", "4294967294", 0 },
{ "4294967293:4294967295", "4294967293:4294967294", 0 },