Skip to content

Commit

Permalink
fix: Fix crash when opening mangled PBO
Browse files Browse the repository at this point in the history
  • Loading branch information
rvost committed May 21, 2023
1 parent 83689f6 commit 11cf373
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions PboSpy/Modules/ConfigExplorer/Utils/FileBaseExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ public static bool IsBinaryConfig(this FileBase file)
{
if (file.DataSize > 4)
{
using var stream = file.GetStream();
return IsBinaryConfig(stream);
try
{
using var stream = file.GetStream();
return IsBinaryConfig(stream);
}
catch
{
return false; // TODO: Refactor
}
}
return false;
}
Expand Down

0 comments on commit 11cf373

Please sign in to comment.