1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-19 12:39:11 +00:00

(svn r8171) -Fix (FS#556): return SL_ERROR when unthreaded saves failed, to make sure we do not try to send zero-byte savegames.

This commit is contained in:
rubidium
2007-01-17 00:01:55 +00:00
parent 1f3ea708c3
commit 0bd6622c2e
2 changed files with 20 additions and 9 deletions

View File

@@ -289,6 +289,8 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_MAP)
file_pointer = fopen(filename, "rb");
fseek(file_pointer, 0, SEEK_END);
if (ftell(file_pointer) == 0) error("network savedump failed - zero sized savegame?");
// Now send the _frame_counter and how many packets are coming
p = NetworkSend_Init(PACKET_SERVER_MAP);
NetworkSend_uint8(p, MAP_PACKET_START);