Fixed infinite loop in CRTDLL__fcloseall.

This commit is contained in:
Alexandre Julliard 2000-12-16 20:19:11 +00:00
parent 85722666a9
commit b583ed33de
1 changed files with 2 additions and 2 deletions

View File

@ -362,9 +362,9 @@ INT __cdecl CRTDLL__eof( INT fd )
*/ */
INT __cdecl CRTDLL__fcloseall(VOID) INT __cdecl CRTDLL__fcloseall(VOID)
{ {
int num_closed = 0, i = 3; int num_closed = 0, i;
while(i < __CRTDLL_fdend) for (i = 3; i < __CRTDLL_fdend; i++)
if (__CRTDLL_handles[i] != INVALID_HANDLE_VALUE) if (__CRTDLL_handles[i] != INVALID_HANDLE_VALUE)
{ {
CRTDLL__close(i); CRTDLL__close(i);