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

Open
opened 2021-12-22 07:51:10 +00:00 by KuromeSan · 0 comments
KuromeSan commented 2021-12-22 07:51:10 +00:00 (Migrated from github.com)

if you see here,
380b676777/src/filesystem.cpp (L602-L603)

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 >_<

if you see here, https://github.com/Ancurio/mkxp/blob/380b676777b101a7d6648a8e6b9a226a8984bbc0/src/filesystem.cpp#L602-L603 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 in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: MapleShrine/mkxp#246
No description provided.