When failing to open a savegame file for writing, print the reason to the log.

git-svn-id: https://svn.eduke32.com/eduke32@2393 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-01 23:35:53 +00:00
parent edb110b692
commit e5a133db8b

View file

@ -881,9 +881,14 @@ int32_t G_SavePlayer(int32_t spot)
Bsnprintf(temp, sizeof(temp), "%s", fn);
temp[sizeof(temp)-1] = 0;
errno = 0;
fil = fopen(temp, "wb");
if (!fil)
{
return -1;
OSD_Printf("G_SavePlayer: failed opening '%s' for writing: %s\n",
temp, strerror(errno));
}
}
#ifdef POLYMER