Normalize the string returned by Extension() to lowercase.

This would otherwise break code that branches on the extension,
such as that after 06a188cc.
pull/66/head
whitequark 2016-10-10 20:34:11 +00:00
parent 2371068d01
commit 476860acbb
1 changed files with 5 additions and 2 deletions

View File

@ -428,8 +428,11 @@ void SolveSpaceUI::UpdateWindowTitle() {
static std::string Extension(const std::string &filename) {
int dot = filename.rfind('.');
if(dot >= 0)
return filename.substr(dot + 1, filename.length());
if(dot >= 0) {
std::string ext = filename.substr(dot + 1, filename.length());
std::transform(ext.begin(), ext.end(), ext.begin(), ::tolower);
return ext;
}
return "";
}