comparison data/fileio/CSVFormat.cpp @ 668:ad7c96620886

* Fix crash when importing CSV file with varying number of columns per row
author Chris Cannam
date Mon, 07 Feb 2011 21:14:09 +0000
parents 3a5ee4b6c9ad
children 611a4fa14dde
comparison
equal deleted inserted replaced
667:1c8898816fd0 668:ad7c96620886
307 } 307 }
308 308
309 CSVFormat::ColumnPurpose 309 CSVFormat::ColumnPurpose
310 CSVFormat::getColumnPurpose(int i) const 310 CSVFormat::getColumnPurpose(int i) const
311 { 311 {
312 if (m_columnPurposes.size() <= i) {
313 return ColumnUnknown;
314 }
312 return m_columnPurposes[i]; 315 return m_columnPurposes[i];
313 } 316 }
314 317
315 void 318 void
316 CSVFormat::setColumnPurpose(int i, ColumnPurpose p) 319 CSVFormat::setColumnPurpose(int i, ColumnPurpose p)