mirror of https://github.com/OpenTTD/OpenTTD
(svn r1537) -Fix: Close all and any open filehandles open at shutdown (tamlin)
parent
ae796740aa
commit
208a9b8547
2
fileio.c
2
fileio.c
|
@ -83,7 +83,7 @@ void FioReadBlock(void *ptr, uint size)
|
||||||
fread(ptr, 1, size, _fio.cur_fh);
|
fread(ptr, 1, size, _fio.cur_fh);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FioCloseAll()
|
void FioCloseAll(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
5
ttd.c
5
ttd.c
|
@ -728,8 +728,6 @@ int ttd_main(int argc, char* argv[])
|
||||||
LoadIntroGame();
|
LoadIntroGame();
|
||||||
_switch_mode = SM_NONE;
|
_switch_mode = SM_NONE;
|
||||||
NetworkClientConnectGame(network_conn, rport);
|
NetworkClientConnectGame(network_conn, rport);
|
||||||
} else {
|
|
||||||
// NetworkCoreConnectGame("auto", _network_server_port);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_NETWORK */
|
#endif /* ENABLE_NETWORK */
|
||||||
|
@ -760,6 +758,9 @@ int ttd_main(int argc, char* argv[])
|
||||||
/* uninitialize variables that are allocated dynamic */
|
/* uninitialize variables that are allocated dynamic */
|
||||||
UnInitializeDynamicVariables();
|
UnInitializeDynamicVariables();
|
||||||
|
|
||||||
|
/* Close all and any open filehandles */
|
||||||
|
FioCloseAll();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue