# HG changeset patch # User Teemu Piippo # Date 1378651498 -10800 # Node ID 61e2752dd7cd8632795b66311e31305be011ffc0 # Parent 3ce91eac0f245d4391d4f3cdfa841e07599acfe6 the demo auth checksums need to be read in with readString and not operator>> diff -r 3ce91eac0f24 -r 61e2752dd7cd src/demo.cpp --- 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;