fix packets containing unencoded newlines being incorrectly split into multiple entries

This commit is contained in:
in1tiate 2021-03-28 23:11:22 -05:00
parent 7583c57442
commit 4140a3339a

View File

@ -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();