1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-23 21:17:45 +00:00

Oops, remove accidental unwrap commit in Texture

This commit is contained in:
Joshua Goins 2024-04-20 13:00:07 -04:00
parent 7aeb217e2e
commit 79e6f20d86

View file

@ -85,7 +85,7 @@ impl Texture {
/// Reads an existing TEX file
pub fn from_existing(buffer: ByteSpan) -> Option<Texture> {
let mut cursor = Cursor::new(buffer);
let header = TexHeader::read(&mut cursor).unwrap();
let header = TexHeader::read(&mut cursor).ok()?;
cursor
.seek(SeekFrom::Start(std::mem::size_of::<TexHeader>() as u64))