diff --git a/PowerEditor/src/MISC/Common/Common.cpp b/PowerEditor/src/MISC/Common/Common.cpp index b7e8f3aa..7912b0bc 100644 --- a/PowerEditor/src/MISC/Common/Common.cpp +++ b/PowerEditor/src/MISC/Common/Common.cpp @@ -74,13 +74,7 @@ std::string getFileContent(const TCHAR *file2read) { lenFile = fread(data, 1, blockSize - 1, fp); if (lenFile <= 0) break; - - if (lenFile >= blockSize - 1) - data[blockSize - 1] = '\0'; - else - data[lenFile] = '\0'; - - wholeFileContent += data; + wholeFileContent.append(data, lenFile); } while (lenFile > 0); @@ -88,7 +82,6 @@ std::string getFileContent(const TCHAR *file2read) return wholeFileContent; } - char getDriveLetter() { char drive = '\0';