Add an explicit fflush() when writing the config.

Yes, fclose() flushes the stream and yes, this is unnecessary. But I've
seen at least two times partial written configs on Win 10. :(
This commit is contained in:
Yamagi Burmeister 2016-08-04 09:07:47 +02:00
parent f291693c59
commit 978eec1a8d
2 changed files with 3 additions and 0 deletions

View File

@ -639,6 +639,8 @@ CL_WriteConfiguration(void)
fprintf(f, "// generated by quake, do not modify\n");
Key_WriteBindings(f);
fflush(f);
fclose(f);
Cvar_WriteVariables(path);

View File

@ -471,6 +471,7 @@ Cvar_WriteVariables(char *path)
}
}
fflush(f);
fclose(f);
}