mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 07:44:40 +00:00
Borrow package bytes for detection
This commit is contained in:
1 parent
ac4a6b79a7
commit
138f4e273b
1 file changed
+1
-1
@@ -43,7 +43,7 @@ impl<'a> Package<'a> {
|
||||
.read(&self.name, self.limits.max_model_bytes)
|
||||
.map_err(|e| malformed(KIND, format!("package: {e}")))?
|
||||
.ok_or_else(|| malformed(KIND, "package FBX is missing"))?;
|
||||
if is_package(bytes) {
|
||||
if is_package(&bytes) {
|
||||
return Err(malformed(KIND, "the package holds another package"));
|
||||
}
|
||||
Ok(bytes)
|
||||
|
||||
Reference in new issue
Block a user