(decode_switches): Ignore value of COLUMNS envionment

variable when it is the empty string.  Suggestion from Ulrich Drepper.
This commit is contained in:
Jim Meyering committed 1997-03-10 04:47:32 +00:00
1 parent de397548a8
commit 613357b0ab
1 file changed
+1 -1
+1 -1
View File
@@ -825,7 +825,7 @@ decode_switches (int argc, char **argv)
quote_as_string = 0;
line_length = 80;
if ((p = getenv ("COLUMNS")))
if ((p = getenv ("COLUMNS")) && *p)
{
if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
&& 0 < tmp_long && tmp_long <= INT_MAX)