Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Games such as the legend of dark witch 2 doesn't apply layeredfs mods #2104

Open
cooolgamer opened this issue Dec 5, 2024 · 2 comments
Open

Comments

@cooolgamer
Copy link

cooolgamer commented Dec 5, 2024

Just like Mario Kart 7 when the v1.2 update dropped, some mods (like texts) applied using LayeredFS didn't work because the update used a specific file path.
I noticed that the game "The Legend of Dark Witch 2" also has the same issue

The fix would be something like this (in sysmodules/loader/source/patcher.c, this is Starlight3DS, the lines won't really match but this is the same thing for this issue anyways):
image
This fixes the issue, I can make a pull request, but it would be better to find something else that doing hacky fix for specific games

Update: after some testing, swaping "ro2:" and "rom2:" in the array didn't work, so it's not a false positive, but it didn't get detected at all

@cooolgamer
Copy link
Author

cooolgamer commented Dec 5, 2024

I found the issue
image

  • Added a null terminator (and extended temp size for that)
  • it was temp + 1, not patternSize + 1

doing so works, but it can maybe cause false positive issues

@PabloMK7
Copy link
Collaborator

PabloMK7 commented Dec 5, 2024

So, after discussing with @cooolgamer privately, it was realized that the issue is the null byte check before the pattern. Maybe this is to prevent false positives, but it's failing here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants