The filename should be converted to lower case before comparing.

This commit is contained in:
vision 2014-06-13 15:32:49 +08:00
parent 33fb1dd050
commit 0b8e6a6a83
1 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,9 @@ bool cocos2d::Image::saveToFile(const std::string& filename, bool isToRGB)
bool saveToPNG = false;
bool needToCopyPixels = false;
if (std::string::npos != filename.find(".png"))
std::string basename(filename);
std::transform(basename.begin(), basename.end(), basename.begin(), ::tolower);
if (std::string::npos != basename.find(".png"))
{
saveToPNG = true;
}