mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- fixed crash on message output during decorate parsing
Script position is now initialized at the very beginning of decorate parsing process Script position no longer contains uninitialized file name https://forum.zdoom.org/viewtopic.php?t=64836
This commit is contained in:
parent
6dcabe52ca
commit
f44a9c8453
3 changed files with 10 additions and 0 deletions
|
@ -1174,6 +1174,13 @@ FScriptPosition &FScriptPosition::operator=(const FScriptPosition &other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
FScriptPosition &FScriptPosition::operator=(FScanner &sc)
|
||||
{
|
||||
FileName = sc.ScriptName;
|
||||
ScriptLine = sc.GetMessageLine();
|
||||
return *this;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FScriptPosition::Message
|
||||
|
|
|
@ -167,12 +167,14 @@ struct FScriptPosition
|
|||
|
||||
FScriptPosition()
|
||||
{
|
||||
FileName = NAME_None;
|
||||
ScriptLine=0;
|
||||
}
|
||||
FScriptPosition(const FScriptPosition &other);
|
||||
FScriptPosition(FString fname, int line);
|
||||
FScriptPosition(FScanner &sc);
|
||||
FScriptPosition &operator=(const FScriptPosition &other);
|
||||
FScriptPosition &operator=(FScanner &sc);
|
||||
void Message(int severity, const char *message,...) const GCCPRINTF(3,4);
|
||||
static void ResetErrorCounter()
|
||||
{
|
||||
|
|
|
@ -1151,6 +1151,7 @@ static void ParseActor(FScanner &sc, PNamespace *ns)
|
|||
bag.Namespace = ns;
|
||||
bag.Version = { 2, 0, 0 };
|
||||
bag.fromDecorate = true;
|
||||
bag.ScriptPosition = sc;
|
||||
info = ParseActorHeader(sc, &bag);
|
||||
sc.MustGetToken('{');
|
||||
while (sc.MustGetAnyToken(), sc.TokenType != '}')
|
||||
|
|
Loading…
Reference in a new issue