fix FS_FOpenFileWrite, also make FS_FOpenFile{Write,Append} open in binary mode

This commit is contained in:
svdijk 2013-05-13 21:17:55 +02:00
parent f5a44ff5ae
commit 662229a568

View file

@ -345,7 +345,7 @@ FS_FOpenFileAppend(fsHandle_t *handle)
Com_sprintf(path, sizeof(path), "%s/%s", fs_gamedir, handle->name);
handle->file = fopen(path, "a");
handle->file = fopen(path, "ab");
if (handle->file)
{
@ -377,7 +377,7 @@ FS_FOpenFileWrite(fsHandle_t *handle)
Com_sprintf(path, sizeof(path), "%s/%s", fs_gamedir, handle->name);
if ((handle->file = fopen(path, "w")) == NULL)
if ((handle->file = fopen(path, "wb")) != NULL)
{
if (fs_debug->value)
{