• R/O
  • SSH

zandronum-sandbox-stable: Commit


Commit MetaInfo

Revisionf1eaf798e9457c1c18b156fff509cf5221e860c5 (tree)
Time2013-07-18 03:31:46
AuthorTeemu Piippo <crimsondusk64@gmai...>
CommiterTeemu Piippo

Log Message

Fixed: The "ZCLD" client-side demo header was not written properly.

Change Summary

Incremental Difference

diff -r a3fa4aa68299 -r f1eaf798e945 src/cl_demo.cpp
--- a/src/cl_demo.cpp Tue Jul 16 21:06:38 2013 +0200
+++ b/src/cl_demo.cpp Wed Jul 17 20:31:46 2013 +0200
@@ -241,10 +241,6 @@
241241 {
242242 lCommand = NETWORK_ReadByte( &g_ByteStream );
243243
244- // End of message.
245- if ( lCommand == -1 )
246- break;
247-
248244 switch ( lCommand )
249245 {
250246 case CLD_DEMOVERSION:
@@ -280,6 +276,11 @@
280276 case CLD_DEMOWADS:
281277 CLIENTDEMO_ReadDemoWads( );
282278 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;
283284 }
284285 }
285286
@@ -530,7 +531,7 @@
530531
531532 // Go back real quick and write the length of this demo.
532533 lDemoLength = g_ByteStream.pbStream - g_pbDemoBuffer;
533- ByteStream.pbStream = g_pbDemoBuffer + 6;
534+ ByteStream.pbStream = g_pbDemoBuffer + 5;
534535 ByteStream.pbStreamEnd = g_ByteStream.pbStreamEnd;
535536 NETWORK_WriteLong( &ByteStream, lDemoLength );
536537
Show on old repository browser