Merge bugfix #193 1.0
authorAlpar Juttner <alpar@cs.elte.hu>
Mon, 08 Dec 2008 21:47:15 +0000
branch1.0
changeset 348a07eb292dd95
parent 346 d05ad26c4d71
parent 347 33e9699c7d3a
child 350 d5cfcff85dfd
Merge bugfix #193
     1.1 --- a/lemon/lgf_reader.h	Sat Dec 06 00:00:00 2008 +0000
     1.2 +++ b/lemon/lgf_reader.h	Mon Dec 08 21:47:15 2008 +0000
     1.3 @@ -870,7 +870,9 @@
     1.4        while (readSuccess() && line >> c && c != '@') {
     1.5          readLine();
     1.6        }
     1.7 -      line.putback(c);
     1.8 +      if (readSuccess()) {
     1.9 +        line.putback(c);
    1.10 +      }
    1.11      }
    1.12  
    1.13      void readNodes() {
    1.14 @@ -1699,7 +1701,9 @@
    1.15        while (readSuccess() && line >> c && c != '@') {
    1.16          readLine();
    1.17        }
    1.18 -      line.putback(c);
    1.19 +      if (readSuccess()) {
    1.20 +        line.putback(c);
    1.21 +      }
    1.22      }
    1.23  
    1.24      void readNodes() {
    1.25 @@ -2226,7 +2230,9 @@
    1.26        while (readSuccess() && line >> c && c != '@') {
    1.27          readLine();
    1.28        }
    1.29 -      line.putback(c);
    1.30 +      if (readSuccess()) {
    1.31 +        line.putback(c);
    1.32 +      }
    1.33      }
    1.34  
    1.35    public:
    1.36 @@ -2567,7 +2573,9 @@
    1.37        while (readSuccess() && line >> c && c != '@') {
    1.38          readLine();
    1.39        }
    1.40 -      line.putback(c);
    1.41 +      if (readSuccess()) {
    1.42 +        line.putback(c);
    1.43 +      }
    1.44      }
    1.45  
    1.46      void readMaps(std::vector<std::string>& maps) {