From b2fda7e17f451a4bfefc7a30757bea7b83e97fa8 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 15 Mar 2016 13:03:48 +0100 Subject: [PATCH] [CORRECTED] sv_utils - check and skip processing lines consisting only of 0xa (windows) ( fixes #3359 ) --- plugins/input/csv/csv_utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/input/csv/csv_utils.cpp b/plugins/input/csv/csv_utils.cpp index e8fe78986..ff75a46ed 100644 --- a/plugins/input/csv/csv_utils.cpp +++ b/plugins/input/csv/csv_utils.cpp @@ -128,11 +128,11 @@ std::tuple autodetect_csv_flavour(std::istream & stream, { if (size < file_length && ss.eof()) { - // we can't be sure last line + // we can't be sure that last line // is not truncated so skip it break; } - if (line.size() == 0) continue; // empty lines are not interesting + if (line.size() == 0 || (line.size() == 1 && line[0] == char(0xa))) continue; // empty lines are not interesting auto num_quotes = std::count(line.begin(), line.end(), quote); if (num_quotes % 2 != 0) {