File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -418,11 +418,10 @@ DelimFileAdapter<T>::extendRead(const std::string& fileName) const {
418
418
auto row = nextLine ();
419
419
while (!row.empty ()) {
420
420
++line_num;
421
- ++curRow;
422
421
423
422
// Double capacity if we reach the end of the containers.
424
423
// This is necessary until Simbody issue #401 is addressed.
425
- if (curRow > curCapacity) {
424
+ if (curRow+ 1 > curCapacity) {
426
425
curCapacity *= 2 ;
427
426
timeVec.reserve (curCapacity);
428
427
matrix.resizeKeep (curCapacity, ncol);
@@ -441,9 +440,10 @@ DelimFileAdapter<T>::extendRead(const std::string& fileName) const {
441
440
column_labels.size (),
442
441
static_cast <size_t >(row_vector.size ()));
443
442
444
- matrix.updRow (curRow- 1 ) = std::move (row_vector);
443
+ matrix.updRow (curRow) = std::move (row_vector);
445
444
446
445
row = nextLine ();
446
+ ++curRow;
447
447
}
448
448
449
449
// Resize the matrix down to the correct number of rows.
You can’t perform that action at this time.
0 commit comments