1.1 --- a/lemon/lgf_reader.h Mon Dec 01 14:33:42 2008 +0100
1.2 +++ b/lemon/lgf_reader.h Mon Dec 08 20:23:33 2008 +0100
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) {