Fix: Dead loop when reading an empty .osu file.

Fix: Dead loop when reading an empty .osu file.
This commit is contained in:
Pure-Peace
2021-08-09 01:57:14 +08:00
committed by GitHub
parent 61620d6b25
commit adb968ec86
+1 -3
View File
@@ -604,9 +604,7 @@ macro_rules! parse_body {
let mut reader = $reader::new($input);
let mut buf = String::new();
loop {
read_line!(reader, &mut buf)?;
while read_line!(reader, &mut buf)? != 0 {
// Check for character U+FEFF specifically thanks to map id 797130
if !buf
.trim_matches(|c: char| c.is_whitespace() || c == '')