Fix: Dead loop when reading an empty .osu file.
Fix: Dead loop when reading an empty .osu file.
This commit is contained in:
+1
-3
@@ -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 == '')
|
||||
|
||||
Reference in New Issue
Block a user