# 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/lemon/lgf_reader.h	Sat Dec 06 00:00:00 2008 +0000
+++ b/lemon/lgf_reader.h	Mon Dec 08 20:23:33 2008 +0100
@@ -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) {
