[Lemon-commits] Balazs Dezso: Fix skipSection() function (ticket...
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/33e9699c7d3a
changeset: 446:33e9699c7d3a
user: Balazs Dezso <deba [at] inf.elte.hu>
date: Mon Dec 08 20:23:33 2008 +0100
description:
Fix skipSection() function (ticket #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