fixed bug that was causing seta commands to usually not save to config.cfg (due to...
[xonotic/darkplaces.git] / cvar.c
diff --git a/cvar.c b/cvar.c
index 8e125cb..d3df0c4 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -578,7 +578,7 @@ void Cvar_WriteVariables (qfile_t *f)
 
        // 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))
+               if ((var->flags & CVAR_SAVE) && (strcmp(var->string, var->defstring) || (var->flags & CVAR_ALLOCATED)))
                        FS_Printf(f, "%s%s \"%s\"\n", var->flags & CVAR_ALLOCATED ? "seta " : "", var->name, var->string);
 }