fix packets containing unencoded newlines being incorrectly split into multiple entries
This commit is contained in:
		
							parent
							
								
									7583c57442
								
							
						
					
					
						commit
						4140a3339a
					
				@ -233,8 +233,9 @@ void DemoServer::load_demo(QString filename)
 | 
				
			|||||||
    demo_stream.setCodec("UTF-8");
 | 
					    demo_stream.setCodec("UTF-8");
 | 
				
			||||||
    QString line = demo_stream.readLine();
 | 
					    QString line = demo_stream.readLine();
 | 
				
			||||||
    while (!line.isNull()) {
 | 
					    while (!line.isNull()) {
 | 
				
			||||||
        if (!line.endsWith("%")) {
 | 
					        while (!line.endsWith("%")) {
 | 
				
			||||||
          line += "\n";
 | 
					          line += "\n";
 | 
				
			||||||
 | 
					          line += demo_stream.readLine();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        demo_data.enqueue(line);
 | 
					        demo_data.enqueue(line);
 | 
				
			||||||
        line = demo_stream.readLine();
 | 
					        line = demo_stream.readLine();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user