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

openReadEnumCB just gives up if a closely matching filename is found #246

Open
LiEnby opened this issue Dec 22, 2021 · 0 comments
Open

openReadEnumCB just gives up if a closely matching filename is found #246

LiEnby opened this issue Dec 22, 2021 · 0 comments

Comments

@LiEnby
Copy link

LiEnby commented Dec 22, 2021

if you see here,

mkxp/src/filesystem.cpp

Lines 602 to 603 in 380b676

if (last != '.' && last != '\0')
return PHYSFS_ENUM_STOP;

if the last part of the filename is NOT a \0 or a '.' then it returns PHYSFS_ENUM_STOP,
which will physfs to simply stop looking for more files.

Lets say we need to find Arrow.png, however a file called "Arrow4.png" also exists (as is the case in To The Moon)
if it finds "Arrow4.png" before "Arrow.png" it will simply never find Arrow4.png and give an error saying it doesnt exist.
because "last" in this case would be the 0x34 or "4" not . or \0, so it just gives up looking >_<

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

1 participant