diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-09-06 21:40:13 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-07 07:23:53 -0700 |
commit | c87b9645e7a574c0866b5ba2a5b3530e6c5f98c6 (patch) | |
tree | d6cb2315bb6242b39302994b07fabe8799bd35b3 /qt-ui | |
parent | c8e542e5d38e49ae103e5723e4f1c7c6da83e228 (diff) | |
download | subsurface-c87b9645e7a574c0866b5ba2a5b3530e6c5f98c6.tar.gz |
CSV import: validate column count
We need at least 23 columns when reading in Subsurface CSV.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 49b68174e..c21a6a18e 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -583,7 +583,7 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) headers.replace(CSVApps[value].setpoint, tr("Sample setpoint")); /* Show the Subsurface CSV column headers */ - if (value == SUBSURFACE) { + if (value == SUBSURFACE && currColumns.count() >= 23) { headers.replace(0, tr("Dive #")); headers.replace(1, tr("Date")); headers.replace(2, tr("Time")); |