src/demo.cpp

changeset 24
61e2752dd7cd
parent 23
3ce91eac0f24
child 26
9aab482c9125
--- a/src/demo.cpp	Sun Sep 08 17:18:50 2013 +0300
+++ b/src/demo.cpp	Sun Sep 08 17:44:58 2013 +0300
@@ -157,18 +157,14 @@
 	for (;;) {
 		uint8 header;
 		stream >> header;
-		print ("header: %1\n", (int) header);
 		
 		if (header == DemoBodyStart + offset) {
 			ready = true;
 			break;
 		} elif (header == DemoVersion + offset) {
-			print ("Read demo version\n");
 			stream >> zanversionID;
 			zanversion = readString (stream);
 			
-			print ("version ID: %1, version: %2\n", zanversionID, zanversion);
-			
 			if (!zanversion.startsWith ("1.1-") && !zanversion.startsWith ("1.1.1-")) {
 				uint8 a;
 				stream >> a;
@@ -182,7 +178,6 @@
 			
 			stream >> longSink; // rng seed - we don't need it
 		} elif (header == DemoUserInfo + offset) {
-			print ("Read userinfo\n");
 			userinfo.netname = readString (stream);
 			stream >> userinfo.gender
 			       >> userinfo.color
@@ -207,7 +202,7 @@
 			// The demo has two checksum strings. We're not interested
 			// in them though. Down the sink they go...
 			for (int i = 0; i < 2; ++i)
-				stream >> sink;
+				sink = readString (stream);
 		} else {
 			error (fmt (tr ("Unknown header %1!\n"), (int) header));
 			return 3;
@@ -282,7 +277,7 @@
 		ui.versionLabel->setText (zanversion);
 		ui.iwadLabel->setText (wads[0]);
 		ui.pwadsLabel->setText (pwadtext);
-		dlg->setWindowTitle (fmt (APPNAME " %1", versionString()));
+		dlg->setWindowTitle (str (APPNAME) + " " + versionString());
 		
 		if (!dlg->exec())
 			return 1;

mercurial