mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Filesystem: Do more validity checking in the constructor
This makes it possible to catch errors earlier so that file systems simply fail to load instead of behaving oddly. It also makes it possible to check for errors that weren't checkable before, like the end of a directory being after the end of the parent directory.
This commit is contained in:
@ -46,6 +46,8 @@ public:
|
||||
std::string GetName() const override;
|
||||
std::string GetPath() const override;
|
||||
|
||||
bool IsValid(u64 fst_size, const FileInfoGCWii& parent_directory) const;
|
||||
|
||||
protected:
|
||||
uintptr_t GetAddress() const override;
|
||||
FileInfo& operator++() override;
|
||||
@ -71,6 +73,8 @@ private:
|
||||
// Returns one of the three properties of this FST entry.
|
||||
// Read the comments in EntryProperty for details.
|
||||
u32 Get(EntryProperty entry_property) const;
|
||||
// Returns the name offset, excluding the directory identification byte
|
||||
u64 GetNameOffset() const;
|
||||
|
||||
const u8* m_fst;
|
||||
u8 m_offset_shift;
|
||||
|
Reference in New Issue
Block a user