Don't match cvars that are equal to their default but not locked if they are
engine cvars. Fixes config value reverting on "invalid basedir".
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11362
d7cf8633-e32d-0410-b094-
e92efae38249
// don't save cvars that match their default value
for (var = cvar_vars ; var ; var = var->next)
- if ((var->flags & CVAR_SAVE) && (strcmp(var->string, var->defstring) || !(var->flags & CVAR_DEFAULTSET)))
+ if ((var->flags & CVAR_SAVE) && (strcmp(var->string, var->defstring) || ((var->flags & CVAR_ALLOCATED) && !(var->flags & CVAR_DEFAULTSET))))
{
Cmd_QuoteString(buf1, sizeof(buf1), var->name, "\"\\$", false);
Cmd_QuoteString(buf2, sizeof(buf2), var->string, "\"\\$", false);