diff --git a/src/preprocessor.cpp b/src/preprocessor.cpp index 1034684f8..52cc55286 100644 --- a/src/preprocessor.cpp +++ b/src/preprocessor.cpp @@ -491,15 +491,17 @@ void Preprocessor::handleIncludes(std::string &code, const std::string &filename filename = getHeaderFileName(filename); if (filename.length() == 0) continue; - - if (handledFiles.find(filename) != handledFiles.end()) + + std::string tempFile = filename; + std::transform(tempFile.begin(), tempFile.end(), tempFile.begin(), static_cast < int(*)(int) > (std::tolower)); + if (handledFiles.find(tempFile) != handledFiles.end()) { // We have processed this file already once, skip // it this time to avoid ethernal loop. continue; } - handledFiles[ filename ] = true; + handledFiles[ tempFile ] = true; // filename contains now a file name e.g. "menu.h" std::string processedFile;