mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
`join -1 x' would give a misleading diagnostic
(string_to_join_field): Report that a non-numeric field number is invalid, rather than `so large that it is not representable'.
This commit is contained in:
1 parent
97f63d336f
commit
aa18f80de6
1 file changed
+1
-1
+1
-1
@@ -642,7 +642,7 @@ string_to_join_field (char const *str, char const *err_msg_fmt)
|
||||
uintmax_t val;
|
||||
|
||||
strtol_error s_err = xstrtoumax (str, NULL, 10, &val, "");
|
||||
if (s_err == LONGINT_OVERFLOW || SIZE_MAX < val)
|
||||
if (s_err == LONGINT_OVERFLOW || (s_err == LONGINT_OK && SIZE_MAX < val))
|
||||
{
|
||||
error (EXIT_FAILURE, 0,
|
||||
_("value %s is so large that it is not representable"),
|
||||
|
||||
Reference in new issue
Block a user