]> mj.ucw.cz Git - xsv.git/commitdiff
Truncated temp file is an error, not warning
authorMartin Mares <mj@ucw.cz>
Tue, 24 Jul 2012 14:47:10 +0000 (16:47 +0200)
committerMartin Mares <mj@ucw.cz>
Tue, 24 Jul 2012 14:47:10 +0000 (16:47 +0200)
xsv.c

diff --git a/xsv.c b/xsv.c
index b0e91246cbd2aa1eb0f4f18ede9330a160c88f87..8fd72779d23e5bd11ff80711e2453adc44e31853 100644 (file)
--- a/xsv.c
+++ b/xsv.c
@@ -494,10 +494,8 @@ static int tmp_read(struct format *fmt)
                in_field->len = c;
                while (c--) {
                        int x = getc_unlocked(tf);
-                       if (x < 0) {
-                               warn(fmt, "Truncated temporary file");
-                               return 0;
-                       }
+                       if (x < 0)
+                               die("Truncated temporary file");
                        *line_push(&in_line) = x;
                }
        }