From: Jim Meyering Date: Wed, 10 Mar 2004 10:44:31 +0000 (+0000) Subject: `join -1 x' would give a misleading diagnostic X-Git-Tag: v5.2.1~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa18f80de6731593fb309ede9f0e18b08bde7352;p=thirdparty%2Fcoreutils.git `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'. --- diff --git a/src/join.c b/src/join.c index db875ec321..2716ae339f 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"),