mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-24 13:11:33 +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
8127af1082
commit
677b24b108
3 changed files with 10 additions and 0 deletions
|
@ -1148,6 +1148,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 != '}')
|
||||
|
|
|
@ -1173,6 +1173,13 @@ FScriptPosition &FScriptPosition::operator=(const FScriptPosition &other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
FScriptPosition &FScriptPosition::operator=(FScanner &sc)
|
||||
{
|
||||
FileName = sc.ScriptName;
|
||||
ScriptLine = sc.GetMessageLine();
|
||||
return *this;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// FScriptPosition::Message
|
||||
|
|
|
@ -169,12 +169,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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue