From 1a5047550de7c420b14325c8f6310c9d21e8c76d Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 10 Oct 2016 20:34:11 +0000 Subject: [PATCH] Normalize the string returned by Extension() to lowercase. This would otherwise break code that branches on the extension, such as that after 06a188cc. --- src/solvespace.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/solvespace.cpp b/src/solvespace.cpp index 398cba0..e1dfc4a 100644 --- a/src/solvespace.cpp +++ b/src/solvespace.cpp @@ -427,8 +427,11 @@ void SolveSpaceUI::UpdateWindowTitle(void) { 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 ""; }