Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
GCMemcard: Read comments, banners, and icons via logical data offsets instead of physical ones. #8302
Previously the code assumed that the data for the comments, banners, and icons was contiguous from the first block of the data's physical offset in the memory card, rather than referring to the logical position within the referenced save file, which is not only incorrect for the format but could also lead to out-of-bounds memory accesses. This should now be rectified.
Please scrutinize this, I'm not entirely sure if this is all correct. It seems to give correct results for all memory cards I have access to, but considering how long this old approach seemingly worked who knows.
The Icon/Banner code could probably use some additional rewriting on top of this to be honest, it's a mess. It also seems to disagree with itself on how the bnr_format should actually be interpreted...