+ Space and tab can both be part of the file name

This commit is contained in:
Zezula Ladislav
2017-08-07 08:43:37 +02:00
parent 80021e4a67
commit 76976e56a2
3 changed files with 62 additions and 21 deletions

View File

@@ -175,8 +175,8 @@ static char * ReadListFileLine(TListFileCache * pCache, size_t * PtrLength)
LPBYTE pbLineEnd;
LPBYTE pbExtraString = NULL;
// Skip newlines, spaces, tabs and another non-printable stuff
while(pCache->pPos < pCache->pEnd && pCache->pPos[0] <= 0x20)
// Skip newlines. Keep spaces and tabs, as they can be a legal part of the file name
while(pCache->pPos < pCache->pEnd && (pCache->pPos[0] == 0x0A || pCache->pPos[0] == 0x0D))
pCache->pPos++;
// Set the line begin and end