diff options
| -rw-r--r-- | src/demoserver.cpp | 3 | ||||
| -rw-r--r-- | src/packet_distribution.cpp | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/demoserver.cpp b/src/demoserver.cpp index 88dfdb4b..509a356a 100644 --- a/src/demoserver.cpp +++ b/src/demoserver.cpp @@ -233,8 +233,9 @@ void DemoServer::load_demo(QString filename) demo_stream.setCodec("UTF-8"); QString line = demo_stream.readLine(); while (!line.isNull()) { - if (!line.endsWith("%")) { + while (!line.endsWith("%")) { line += "\n"; + line += demo_stream.readLine(); } demo_data.enqueue(line); line = demo_stream.readLine(); diff --git a/src/packet_distribution.cpp b/src/packet_distribution.cpp index f3810ca7..0a99b9db 100644 --- a/src/packet_distribution.cpp +++ b/src/packet_distribution.cpp @@ -542,7 +542,11 @@ void AOApplication::server_packet_received(AOPacket *p_packet) QVector<evi_type> f_evi_list; for (QString f_string : f_contents_encoded) { - QStringList sub_contents = f_string.split("&"); + QStringList sub_contents; + if (f_contents_encoded.contains("&")) + sub_contents = f_string.split("&"); + else + sub_contents = f_string.split("<and>"); // demos incorrectly encode the separator so we have to account for that if (sub_contents.size() < 3) continue; |
