diff options
Diffstat (limited to 'libbb/xatonum_template.c')
-rw-r--r-- | libbb/xatonum_template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/xatonum_template.c b/libbb/xatonum_template.c index ce01995..bc81160 100644 --- a/libbb/xatonum_template.c +++ b/libbb/xatonum_template.c @@ -49,9 +49,8 @@ unsigned type xstrtou(_range_sfx)(const char *numstr, int base, if (strcmp(suffixes->suffix, e) == 0) { if (XSTR_UTYPE_MAX / suffixes->mult < r) goto range; /* overflow! */ - ++e; r *= suffixes->mult; - break; + goto chk_range; } ++suffixes; } @@ -61,6 +60,7 @@ unsigned type xstrtou(_range_sfx)(const char *numstr, int base, It would be easy enough to allow though if desired. */ if (*e) goto inval; + chk_range: /* Finally, check for range limits. */ if (r >= lower && r <= upper) return r; |