1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-22 13:42:47 +00:00

tsc: do not throw event redefinition error in non-strict mode

This commit is contained in:
Alula 2020-08-28 03:47:50 +02:00
parent 1758aa5740
commit bf03c6c9a1
No known key found for this signature in database
GPG key ID: 3E00485503A1D8BA

View file

@ -729,7 +729,11 @@ impl TextScript {
TextScript::skip_until(b'\n', &mut iter)?;
if event_map.contains_key(&event_num) {
return Err(ParseError(format!("Event {} has been defined twice.", event_num)));
if strict {
return Err(ParseError(format!("Event {} has been defined twice.", event_num)));
} else {
continue;
}
}
let bytecode = TextScript::compile_event(&mut iter, strict)?;