[Lemon-commits] Alpar Juttner: Merge bugfix #193

Lemon HG hg at lemon.cs.elte.hu
Mon Dec 8 23:00:34 CET 2008


details:   http://lemon.cs.elte.hu/hg/lemon/rev/a07eb292dd95
changeset: 447:a07eb292dd95
user:      Alpar Juttner <alpar [at] cs.elte.hu>
date:      Mon Dec 08 21:47:15 2008 +0000
description:
	Merge bugfix #193

diffstat:

1 file changed, 12 insertions(+), 4 deletions(-)
lemon/lgf_reader.h |   16 ++++++++++++----

diffs (47 lines):

diff --git a/lemon/lgf_reader.h b/lemon/lgf_reader.h
--- a/lemon/lgf_reader.h
+++ b/lemon/lgf_reader.h
@@ -870,7 +870,9 @@
       while (readSuccess() && line >> c && c != '@') {
         readLine();
       }
-      line.putback(c);
+      if (readSuccess()) {
+        line.putback(c);
+      }
     }
 
     void readNodes() {
@@ -1699,7 +1701,9 @@
       while (readSuccess() && line >> c && c != '@') {
         readLine();
       }
-      line.putback(c);
+      if (readSuccess()) {
+        line.putback(c);
+      }
     }
 
     void readNodes() {
@@ -2226,7 +2230,9 @@
       while (readSuccess() && line >> c && c != '@') {
         readLine();
       }
-      line.putback(c);
+      if (readSuccess()) {
+        line.putback(c);
+      }
     }
 
   public:
@@ -2567,7 +2573,9 @@
       while (readSuccess() && line >> c && c != '@') {
         readLine();
       }
-      line.putback(c);
+      if (readSuccess()) {
+        line.putback(c);
+      }
     }
 
     void readMaps(std::vector<std::string>& maps) {



More information about the Lemon-commits mailing list