diff --git a/src/storage/SparseMatrix.cpp b/src/storage/SparseMatrix.cpp index 401fc4082..1792ae5e9 100644 --- a/src/storage/SparseMatrix.cpp +++ b/src/storage/SparseMatrix.cpp @@ -688,6 +688,9 @@ namespace storm { *writeIt = std::move(intermediateRowEntry); ++writeIt; } + } else { + // skip the intermediate rows + writeIt = getRow(smallerRow).begin(); } // Write the larger row to its new position. @@ -720,6 +723,9 @@ namespace storm { *writeIt = std::move(*intermediateRowEntryIt); --writeIt; } + } else { + // skip the intermediate rows + writeIt = getRow(smallerRow).end() - 1; } // Write the larger row to its new position.