summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cut.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cut.c b/src/cut.c
index 45199c125..2c298ec71 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -478,9 +478,9 @@ cut_fields (FILE *stream)
delim, '\n', 0);
if (len < 0)
{
- if (feof (stream))
+ if (ferror (stream) || feof (stream))
break;
- FATAL_ERROR (_("virtual memory exhausted"));
+ xalloc_die ();
}
assert (len != 0);