aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2018-09-06 03:47:45 +0200
committerDaniel Schadt <kingdread@gmx.de>2018-09-06 03:48:42 +0200
commit0ebd3889b1cb62cfabbe01b6e953bfc02c8e6575 (patch)
tree4b948afba2d049b46ea3350f0a060db6030346da
parentf6602040910f461b465d78307ffd81bda1be55da (diff)
downloadevtclib-0ebd3889b1cb62cfabbe01b6e953bfc02c8e6575.tar.gz
evtclib-0ebd3889b1cb62cfabbe01b6e953bfc02c8e6575.tar.bz2
evtclib-0ebd3889b1cb62cfabbe01b6e953bfc02c8e6575.zip
make parser more lenient
Somehow, new files (after ~2018-08-10) won't parse without this.
-rw-r--r--src/raw/parser.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raw/parser.rs b/src/raw/parser.rs
index 97c0bc7..2de867b 100644
--- a/src/raw/parser.rs
+++ b/src/raw/parser.rs
@@ -283,8 +283,8 @@ pub fn parse_event<T: Read>(input: &mut T) -> ParseResult<CbtEvent> {
let iff = IFF::from_u8(input.read_u8()?).unwrap_or(IFF::None);
let buff = input.read_u8()?;
let result = CbtResult::from_u8(input.read_u8()?).unwrap_or(CbtResult::None);
- let is_activation = CbtActivation::from_u8(input.read_u8()?)?;
- let is_buffremove = CbtBuffRemove::from_u8(input.read_u8()?)?;
+ let is_activation = CbtActivation::from_u8(input.read_u8()?).unwrap_or(CbtActivation::None);
+ let is_buffremove = CbtBuffRemove::from_u8(input.read_u8()?).unwrap_or(CbtBuffRemove::None);
let is_ninety = input.read_u8()? != 0;
let is_fifty = input.read_u8()? != 0;
let is_moving = input.read_u8()? != 0;