# HG changeset patch # User Balazs Dezso # Date 1228764213 -3600 # Node ID 33e9699c7d3a7861ea7246f59160b2302e39c4cf # Parent 62f9787c516c468a3676bb7a91731da83aa64543 Fix skipSection() function (ticket #193) diff -r 62f9787c516c -r 33e9699c7d3a lemon/lgf_reader.h --- a/lemon/lgf_reader.h Mon Dec 01 14:33:42 2008 +0100 +++ 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& maps) {