From 69f13cface44a6b97c44d8256977e1cecdcd5912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Thu, 22 Apr 2021 18:00:10 +0200 Subject: [PATCH] remove columns with empty header --- Software/PC_Application/csv.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Software/PC_Application/csv.cpp b/Software/PC_Application/csv.cpp index 5c0dc84..83084df 100644 --- a/Software/PC_Application/csv.cpp +++ b/Software/PC_Application/csv.cpp @@ -27,6 +27,10 @@ CSV CSV::fromFile(QString filename, char sep) if(firstLine) { // create columns and set headers for(auto l : stringList) { + if(l.isEmpty()) { + // header needs to be present, abort here + break; + } Column c; c.header = l; csv._columns.push_back(c);