mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Fixed a bug in FindFirstFileW() and FindNextFileW().
The lengs of the copied strings was wrong. svn path=/trunk/; revision=2133
This commit is contained in:
parent
a798ec1a86
commit
f1a3075ad7
1 changed files with 9 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: find.c,v 1.27 2000/08/05 18:01:49 dwelch Exp $
|
||||
/* $Id: find.c,v 1.28 2001/08/01 19:26:41 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -398,11 +398,12 @@ FindFirstFileW (
|
|||
lpFindFileData->nFileSizeLow = IData->FileInfo.EndOfFile.u.LowPart;
|
||||
memcpy (lpFindFileData->cFileName,
|
||||
IData->FileInfo.FileName,
|
||||
IData->FileInfo.FileNameLength);
|
||||
IData->FileInfo.FileNameLength * sizeof(WCHAR));
|
||||
lpFindFileData->cFileName[IData->FileInfo.FileNameLength] = 0;
|
||||
memcpy (lpFindFileData->cAlternateFileName,
|
||||
IData->FileInfo.ShortName,
|
||||
IData->FileInfo.ShortNameLength);
|
||||
|
||||
IData->FileInfo.ShortNameLength * sizeof(WCHAR));
|
||||
lpFindFileData->cAlternateFileName[IData->FileInfo.ShortNameLength] = 0;
|
||||
return IData;
|
||||
}
|
||||
|
||||
|
@ -438,11 +439,12 @@ FindNextFileW (
|
|||
lpFindFileData->nFileSizeLow = IData->FileInfo.EndOfFile.u.LowPart;
|
||||
memcpy (lpFindFileData->cFileName,
|
||||
IData->FileInfo.FileName,
|
||||
IData->FileInfo.FileNameLength);
|
||||
IData->FileInfo.FileNameLength * sizeof(WCHAR));
|
||||
lpFindFileData->cFileName[IData->FileInfo.FileNameLength] = 0;
|
||||
memcpy (lpFindFileData->cAlternateFileName,
|
||||
IData->FileInfo.ShortName,
|
||||
IData->FileInfo.ShortNameLength);
|
||||
|
||||
IData->FileInfo.ShortNameLength * sizeof(WCHAR));
|
||||
lpFindFileData->cAlternateFileName[IData->FileInfo.ShortNameLength] = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue