This is a fork of Zandronum used on servers hosted by The Sentinels Playground (TSPG).
リビジョン | f1eaf798e9457c1c18b156fff509cf5221e860c5 (tree) |
---|---|
日時 | 2013-07-18 03:31:46 |
作者 | Teemu Piippo <crimsondusk64@gmai...> |
コミッター | Teemu Piippo |
Fixed: The "ZCLD" client-side demo header was not written properly.
@@ -241,10 +241,6 @@ | ||
241 | 241 | { |
242 | 242 | lCommand = NETWORK_ReadByte( &g_ByteStream ); |
243 | 243 | |
244 | - // End of message. | |
245 | - if ( lCommand == -1 ) | |
246 | - break; | |
247 | - | |
248 | 244 | switch ( lCommand ) |
249 | 245 | { |
250 | 246 | case CLD_DEMOVERSION: |
@@ -280,6 +276,11 @@ | ||
280 | 276 | case CLD_DEMOWADS: |
281 | 277 | CLIENTDEMO_ReadDemoWads( ); |
282 | 278 | break; |
279 | + | |
280 | + // [Dusk] Bad headers shouldn't just be ignored, that's just asking for trouble. | |
281 | + default: | |
282 | + I_Error( "Unknown demo header %ld!\n", lCommand ); | |
283 | + break; | |
283 | 284 | } |
284 | 285 | } |
285 | 286 |
@@ -530,7 +531,7 @@ | ||
530 | 531 | |
531 | 532 | // Go back real quick and write the length of this demo. |
532 | 533 | lDemoLength = g_ByteStream.pbStream - g_pbDemoBuffer; |
533 | - ByteStream.pbStream = g_pbDemoBuffer + 6; | |
534 | + ByteStream.pbStream = g_pbDemoBuffer + 5; | |
534 | 535 | ByteStream.pbStreamEnd = g_ByteStream.pbStreamEnd; |
535 | 536 | NETWORK_WriteLong( &ByteStream, lDemoLength ); |
536 | 537 |