forked from StrafesNET/map-tool
fix parse
This commit is contained in:
parent
a7554da1c5
commit
7ab20f36a7
@ -337,9 +337,9 @@ struct ParseScriptActionErr;
|
|||||||
impl std::str::FromStr for ScriptActionParseResult {
|
impl std::str::FromStr for ScriptActionParseResult {
|
||||||
type Err=ParseScriptActionErr;
|
type Err=ParseScriptActionErr;
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err>{
|
fn from_str(s: &str) -> Result<Self, Self::Err>{
|
||||||
if s=="pass"||s=="1"{
|
if s=="pass\n"||s=="1\n"{
|
||||||
Ok(Self::Pass)
|
Ok(Self::Pass)
|
||||||
}else if s=="block"{
|
}else if s=="block\n"{
|
||||||
Ok(Self::Block)
|
Ok(Self::Block)
|
||||||
}else{
|
}else{
|
||||||
Err(ParseScriptActionErr)
|
Err(ParseScriptActionErr)
|
||||||
|
Loading…
Reference in New Issue
Block a user