- Don't record pointers to OptionValues outside of the OptionValues table, so that they can be redefined.

SVN r3675 (trunk)
This commit is contained in:
Randy Heit 2012-06-02 03:12:14 +00:00
commit 36d348dba6
3 changed files with 39 additions and 38 deletions

View file

@ -509,7 +509,7 @@ static void ParseOptionValue(FScanner &sc)
FOptionValues **pOld = OptionValues.CheckKey(optname);
if (pOld != NULL && *pOld != NULL)
{
sc.ScriptError("Redefinition of option value set '%s'", optname.GetChars());
delete *pOld;
}
OptionValues[optname] = val;
}
@ -542,7 +542,7 @@ static void ParseOptionString(FScanner &sc)
FOptionValues **pOld = OptionValues.CheckKey(optname);
if (pOld != NULL && *pOld != NULL)
{
sc.ScriptError("Redefinition of option value set '%s'", optname.GetChars());
delete *pOld;
}
OptionValues[optname] = val;
}