mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-08-23 06:43:54 +02:00
Replay crash fix
This commit is contained in:
@@ -1366,7 +1366,11 @@ void CReplay::SaveReplayToHD(void)
|
|||||||
{
|
{
|
||||||
CFileMgr::SetDirMyDocuments();
|
CFileMgr::SetDirMyDocuments();
|
||||||
int fw = CFileMgr::OpenFileForWriting("replay.rep");
|
int fw = CFileMgr::OpenFileForWriting("replay.rep");
|
||||||
if (fw < 0){
|
#ifdef FIX_BUGS
|
||||||
|
if (fw == 0) {
|
||||||
|
#else
|
||||||
|
if (fw < 0){ // BUG?
|
||||||
|
#endif
|
||||||
debug("Couldn't open replay.rep for writing");
|
debug("Couldn't open replay.rep for writing");
|
||||||
CFileMgr::SetDir("");
|
CFileMgr::SetDir("");
|
||||||
return;
|
return;
|
||||||
@@ -1397,7 +1401,7 @@ void PlayReplayFromHD(void)
|
|||||||
{
|
{
|
||||||
CFileMgr::SetDirMyDocuments();
|
CFileMgr::SetDirMyDocuments();
|
||||||
int fr = CFileMgr::OpenFile("replay.rep", "rb");
|
int fr = CFileMgr::OpenFile("replay.rep", "rb");
|
||||||
if (fr < 0) {
|
if (fr == 0) {
|
||||||
debug("Couldn't open replay.rep for reading");
|
debug("Couldn't open replay.rep for reading");
|
||||||
/* Forgot to SetDir? */
|
/* Forgot to SetDir? */
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user