Skip to content

Commit

Permalink
DehReader: Fixed (parser bug) skipping over text patches
Browse files Browse the repository at this point in the history
After parsing a text patch the parser should skip to the start of
the next line rather than to start of the next section.

Text patches are parsed with different semantics, they are not a
"section", so the skip-to-next-section logic (which assumes that
the parser is currently reading a section) won't work as expected.
  • Loading branch information
danij-deng committed Dec 18, 2012
1 parent 5ec7cab commit 96e0d6b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions doomsday/plugins/dehread/src/dehreader.cpp
Expand Up @@ -419,7 +419,6 @@ class DehReader
}

parseText(oldSize, newSize);
skipToNextSection();
}
else if(line.beginsWith("Misc", Qt::CaseInsensitive))
{
Expand Down Expand Up @@ -1602,9 +1601,6 @@ class DehReader
String oldStr = readTextBlob(oldSize);
String newStr = readTextBlob(newSize);

// Skip anything else on the line.
skipToEOL();

if(!(flags & NoText)) // Disabled?
{
// Try each type of "text" replacement in turn...
Expand All @@ -1626,6 +1622,8 @@ class DehReader
{
LOG_DEBUG("Skipping disabled Text patch.");
}

skipToNextLine();
}

void parseStringsBex()
Expand Down

0 comments on commit 96e0d6b

Please sign in to comment.