Changeset 2190


Ignore:
Timestamp:
May 20, 2015 8:48:41 AM (4 years ago)
Author:
stefan
Message:

fix place where to add info on generator; add assert to point out an invalid read

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cbc/src/CbcModel.cpp

    r2188 r2190  
    73177317            cutsToDrop = new int[currentNumberCuts] ;
    73187318            assert (currentNumberCuts + numberRowsAtContinuous_ <= lastws->getNumArtificial());
     7319            assert (currentNumberCuts <= maximumWhich_); // we will read from whichGenerator_[0..currentNumberCuts-1] below, so should have all these entries
    73197320            for (i = 0; i < currentNumberCuts; i++) {
    73207321                CoinWarmStartBasis::Status status =
     
    85778578            if (numberToAdd > 0) {
    85788579                int i ;
    8579                 int * whichGenerator = whichGenerator_ -
    8580                   numberRowsAtContinuous_+solver_->getNumRows();
     8580                int * whichGenerator = whichGenerator_ + lastNumberCuts;
    85818581                // Faster to add all at once
    85828582                addCuts = new const OsiRowCut * [numberToAdd] ;
Note: See TracChangeset for help on using the changeset viewer.