mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-29 07:01:55 +00:00
Text parser: fixed a problem where the stream's position was not set correctly when checking the next token. Fixes #1010
This commit is contained in:
parent
66a0618e83
commit
14a494078a
1 changed files with 3 additions and 1 deletions
|
@ -545,6 +545,8 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long prevstreamposition = DataStream.Position;
|
||||||
|
|
||||||
string token = ReadToken();
|
string token = ReadToken();
|
||||||
|
|
||||||
if(string.Compare(token, expectedtoken, true) != 0)
|
if(string.Compare(token, expectedtoken, true) != 0)
|
||||||
|
@ -552,7 +554,7 @@ namespace CodeImp.DoomBuilder.ZDoom
|
||||||
if(reporterror) ReportError("Expected \"" + expectedtoken + "\", but got \"" + token + "\"");
|
if(reporterror) ReportError("Expected \"" + expectedtoken + "\", but got \"" + token + "\"");
|
||||||
|
|
||||||
// Rewind so this structure can be read again
|
// Rewind so this structure can be read again
|
||||||
DataStream.Seek(-token.Length, SeekOrigin.Current);
|
DataStream.Seek(prevstreamposition, SeekOrigin.Begin);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue