COIN-OR::LEMON - Graph Library

Ticket #193: 09e530504129.patch

File 09e530504129.patch, 1.3 KB (added by Balazs Dezso, 15 years ago)

Bug fix

  • lemon/lgf_reader.h

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1228764213 -3600
    # Branch 1.0
    # Node ID 09e5305041299284970abd1ce94e6d6024445d28
    # Parent  d05ad26c4d717b2d167c2427e4bbeb45546508c7
    Fix skipSection() function (ticket #193)
    
    diff -r d05ad26c4d71 -r 09e530504129 lemon/lgf_reader.h
    a b  
    870870      while (readSuccess() && line >> c && c != '@') {
    871871        readLine();
    872872      }
    873       line.putback(c);
     873      if (readSuccess()) {
     874        line.putback(c);
     875      }
    874876    }
    875877
    876878    void readNodes() {
     
    16991701      while (readSuccess() && line >> c && c != '@') {
    17001702        readLine();
    17011703      }
    1702       line.putback(c);
     1704      if (readSuccess()) {
     1705        line.putback(c);
     1706      }
    17031707    }
    17041708
    17051709    void readNodes() {
     
    22262230      while (readSuccess() && line >> c && c != '@') {
    22272231        readLine();
    22282232      }
    2229       line.putback(c);
     2233      if (readSuccess()) {
     2234        line.putback(c);
     2235      }
    22302236    }
    22312237
    22322238  public:
     
    25672573      while (readSuccess() && line >> c && c != '@') {
    25682574        readLine();
    25692575      }
    2570       line.putback(c);
     2576      if (readSuccess()) {
     2577        line.putback(c);
     2578      }
    25712579    }
    25722580
    25732581    void readMaps(std::vector<std::string>& maps) {