From 0ff3fdfaa52ee4b71632f201d6bfabb0ffbc36d7 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 30 Nov 2007 19:24:40 +0000 Subject: Fixed the overshoot in the Bu::TafReader, it was reading the lookahead character from the stream even when it should have known it was at the end, and then it was reading an extra character after that anyway :-P It is now fixed, and the stream is positioned at the character immediately after the closing } of the root taf group, great for things like the svtools. --- src/tafreader.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/tafreader.cpp') diff --git a/src/tafreader.cpp b/src/tafreader.cpp index aaac8d7..7054581 100644 --- a/src/tafreader.cpp +++ b/src/tafreader.cpp @@ -40,7 +40,7 @@ Bu::TafGroup *Bu::TafReader::readGroup() if( c != '}' ) throw TafException("Expected '}'"); - next(); + //next(); return pGroup; } @@ -184,7 +184,17 @@ bool Bu::TafReader::isws() void Bu::TafReader::next() { - c = la; - sIn.read( &la, 1 ); + if( c == '}' ) + { + sIn.read( &c, 1 ); + if( c != '}' ) + sIn.read( &la, 1 ); + } + else + { + c = la; + if( c != '}' ) + sIn.read( &la, 1 ); + } } -- cgit v1.2.3