simplecpp: Try to fix VS2010 compiler error

This commit is contained in:
Daniel Marjamäki 2016-08-21 17:18:54 +02:00
parent 863efda53c
commit 9968b61db3
1 changed files with 1 additions and 1 deletions

View File

@ -1499,7 +1499,7 @@ namespace simplecpp {
#ifdef SIMPLECPP_WINDOWS #ifdef SIMPLECPP_WINDOWS
std::string realFilename(const std::string &f) { std::string realFilename(const std::string &f) {
WIN32_FIND_DATA FindFileData; WIN32_FIND_DATA FindFileData;
TCHAR buf[f.size()+1] = {0}; TCHAR buf[4096] = {0};
for (unsigned int i = 0; i < f.size(); ++i) for (unsigned int i = 0; i < f.size(); ++i)
buf[i] = f[i]; buf[i] = f[i];
HANDLE hFind = FindFirstFile(buf, &FindFileData); HANDLE hFind = FindFirstFile(buf, &FindFileData);