summaryrefslogtreecommitdiff
path: root/src/join.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-03-10 10:44:31 +0000
committerJim Meyering <jim@meyering.net>2004-03-10 10:44:31 +0000
commitaa18f80de6731593fb309ede9f0e18b08bde7352 (patch)
treec153ab021df3878104b81e1c6832699fc786c0b0 /src/join.c
parent97f63d336f069f86ab108cd2ebfa5c3dff907809 (diff)
downloadcoreutils-aa18f80de6731593fb309ede9f0e18b08bde7352.tar.xz
`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'.
Diffstat (limited to 'src/join.c')
-rw-r--r--src/join.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/join.c b/src/join.c
index db875ec32..2716ae339 100644
--- a/src/join.c
+++ b/src/join.c
@@ -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"),