fix: prevent oor indexing while decoding (#39)

This commit is contained in:
Badewanne3
2024-07-24 11:18:11 +02:00
committed by GitHub
parent 861135eb69
commit daf718d74e
+4 -1
View File
@@ -186,7 +186,10 @@ impl BeatmapState {
}
}
self.vertices[0].path_type = Some(path_type);
self.vertices
.first_mut()
.ok_or(ParseBeatmapError::InvalidHitObjectLine)?
.path_type = Some(path_type);
let mut start_idx = 0;
let mut end_idx = 0;