invalid one, rather than just the part that contained the error.
2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
+ * src/shuf.c (main): Quote the entire range when reporting an
+ invalid one, rather than just the part that contained the error.
+
* tests/stty/row-col-1: Rewrite to avoid temporary file that is
sometimes left behind if the test is skipped or interrupted.
{
unsigned long int argval = 0;
char *p = strchr (optarg, '-');
+ char const *hi_optarg = optarg;
bool invalid = !p;
if (input_numbers_option_used (lo_input, hi_input))
|| SIZE_MAX < argval);
*p = '-';
lo_input = argval;
- optarg = p + 1;
+ hi_optarg = p + 1;
}
- invalid |= ((xstrtoul (optarg, NULL, 10, &argval, NULL)
+ invalid |= ((xstrtoul (hi_optarg, NULL, 10, &argval, NULL)
!= LONGINT_OK)
|| SIZE_MAX < argval);
hi_input = argval;