Merge pull request #2 from Pure-Peace/next
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 reader = $reader::new($input);
|
||||||
let mut buf = String::new();
|
let mut buf = String::new();
|
||||||
|
|
||||||
loop {
|
while read_line!(reader, &mut buf)? != 0 {
|
||||||
read_line!(reader, &mut buf)?;
|
|
||||||
|
|
||||||
// Check for character U+FEFF specifically thanks to map id 797130
|
// Check for character U+FEFF specifically thanks to map id 797130
|
||||||
if !buf
|
if !buf
|
||||||
.trim_matches(|c: char| c.is_whitespace() || c == '')
|
.trim_matches(|c: char| c.is_whitespace() || c == '')
|
||||||
|
|||||||
Reference in New Issue
Block a user