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

Fix texture loading if casing mismatches filename #846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kblaschke
Copy link
Member

Always use lower-case unqualified names to find and cache the actual textures.

Always use lower-case unqualified names to find and cache the actual textures.
@kblaschke kblaschke added the bug label Oct 7, 2024
@kblaschke kblaschke added this to the 4.2 milestone Oct 7, 2024
@kblaschke kblaschke self-assigned this Oct 7, 2024
Copy link
Collaborator

@dpw13 dpw13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as long as everything builds.

std::transform(ext.begin(), ext.end(), ext.begin(), tolower);
return ext;

return Utils::ToLower(filename.substr(start + 1, filename.length()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is it start + 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because "start" always includes the ., we only want the extension without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

4 participants