Fix bug on comments

This commit is contained in:
Thomas Forgione 2018-11-13 14:38:51 +01:00
parent 258470f203
commit 0aaac28d81
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,8 @@ impl LineParser for ObjParser {
"vn" => self.parse_normal(line_number, line, path),
"usemtl" => Ok(Element::UseMaterial(split.nth(0).unwrap().to_owned())),
"f" => self.parse_face(line_number, line, path),
"#" | "g" | "s" | "o" => Ok(Element::None),
"g" | "s" | "o" => Ok(Element::None),
first if first.starts_with('#') => Ok(Element::None),
key if key.len() != 0 => Err(ParserError::UnexpectedKeyword(path.to_owned(), line_number, key.to_owned())),
_ => Ok(Element::None),
}