# HG changeset patch # User Alpar Juttner # Date 1228773034 0 # Node ID 919878a41a601e22b068076726898228235ef9b1 # Parent b2564598b46d7c2c22ce78cc59cd8470375b818c# Parent 33e9699c7d3a7861ea7246f59160b2302e39c4cf Merge diff -r b2564598b46d -r 919878a41a60 lemon/lgf_reader.h --- a/lemon/lgf_reader.h Mon Dec 08 15:47:20 2008 +0000 +++ b/lemon/lgf_reader.h Mon Dec 08 21:50:34 2008 +0000 @@ -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) {