mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- fixed: Option value sets for the menu may not be redefined. An attempt to do so must produce a fatal error.
SVN r3671 (trunk)
This commit is contained in:
parent
3bd45f8011
commit
e28ecdda50
1 changed files with 8 additions and 2 deletions
|
@ -507,7 +507,10 @@ static void ParseOptionValue(FScanner &sc)
|
|||
pair.Text = strbin1(sc.String);
|
||||
}
|
||||
FOptionValues **pOld = OptionValues.CheckKey(optname);
|
||||
if (pOld != NULL && *pOld != NULL) delete *pOld;
|
||||
if (pOld != NULL && *pOld != NULL)
|
||||
{
|
||||
sc.ScriptError("Redefinition of option value set '%s'", optname.GetChars())
|
||||
}
|
||||
OptionValues[optname] = val;
|
||||
}
|
||||
|
||||
|
@ -537,7 +540,10 @@ static void ParseOptionString(FScanner &sc)
|
|||
pair.Text = strbin1(sc.String);
|
||||
}
|
||||
FOptionValues **pOld = OptionValues.CheckKey(optname);
|
||||
if (pOld != NULL && *pOld != NULL) delete *pOld;
|
||||
if (pOld != NULL && *pOld != NULL)
|
||||
{
|
||||
sc.ScriptError("Redefinition of option value set '%s'", optname.GetChars())
|
||||
}
|
||||
OptionValues[optname] = val;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue