# HG changeset patch # User Alpar Juttner # Date 1229120069 0 # Node ID 5c69a36729cbeaab976df88a5747a71d89629943 # Parent e9a568cc86e337737d8b2fe5442a690f29ec6f45# Parent 919878a41a601e22b068076726898228235ef9b1 Merge diff -r e9a568cc86e3 -r 5c69a36729cb lemon/lgf_reader.h --- a/lemon/lgf_reader.h Fri Dec 12 21:41:05 2008 +0000 +++ b/lemon/lgf_reader.h Fri Dec 12 22:14:29 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) {