rickomax / psxprev

PSXPREV - Playstation (PSX) Files Previewer/Extractor
BSD 2-Clause "Simplified" License
193 stars 10 forks source link

Fix empty Croc models polluting model list #57

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

When reading from a folder or even a single file with all model formats being scanned for, Croc models will end up polluting the results, often with multiple models in the same file at different offsets. This is because the countFaces number can be zero and reading the model will still succeed (resulting in a model with no triangles). Other checks already exist to make sure the model isn't empty, such as comparing countVerts.

When countFaces is 0, null will be returned, like with other checks.

rickomax commented 1 year ago

Thank you for another contribution!

trigger-segfault commented 1 year ago

Hopefully I'm not spamming PRs too much for you. I've still got more I want to work on. :P