Skip to content

Commit b5c0c83

Browse files
committed
[parser] Fix bug in scanner that caused parse errors in certain recursive macro call scenarios.
1 parent f9e8bce commit b5c0c83

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

source/parser/scanner.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -701,14 +701,11 @@ UCS2String Scanner::BufferedSource::GetInputStreamName() const
701701
bool Scanner::BufferedSource::SeekAndRefill(POV_OFF_T pos)
702702
{
703703
mBuffer.Clear();
704-
if (mBase != pos)
705-
{
706-
bool seekOk = mpStream->seekg(pos);
707-
mBase = mpStream->tellg();
708-
POV_PARSER_ASSERT((mBase == pos) || !seekOk);
709-
if (!seekOk)
710-
return false; // TODO - Maybe report issue via an exception.
711-
}
704+
bool seekOk = mpStream->seekg(pos);
705+
mBase = mpStream->tellg();
706+
POV_PARSER_ASSERT((mBase == pos) || !seekOk);
707+
if (!seekOk)
708+
return false; // TODO - Maybe report issue via an exception.
712709
mExhausted = false;
713710
(void)RefillBuffer();
714711
return true;

0 commit comments

Comments
 (0)