mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
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>
This commit is contained in:
parent
c8e542e5d3
commit
c87b9645e7
1 changed files with 1 additions and 1 deletions
|
@ -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"));
|
||||
|
|
Loading…
Reference in a new issue