Remove getFileContain function's limitation.
This commit is contained in:
parent
ec340000cc
commit
e919d4d05a
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user