From aa18f80de6731593fb309ede9f0e18b08bde7352 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 10 Mar 2004 10:44:31 +0000 Subject: [PATCH] `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'. --- src/join.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"), -- 2.47.2