msvcrt: Fix FILE critical section initialization.

This commit is contained in:
Piotr Caban 2011-11-24 12:13:03 +01:00 committed by Alexandre Julliard
parent 3d028ab67c
commit 66520ea08a
1 changed files with 5 additions and 2 deletions

View File

@ -364,8 +364,11 @@ static MSVCRT_FILE* msvcrt_alloc_fp(void)
{
if (i == MSVCRT_stream_idx)
{
InitializeCriticalSection(&((file_crit*)file)->crit);
((file_crit*)file)->crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit");
if (file<MSVCRT__iob || file>=MSVCRT__iob+_IOB_ENTRIES)
{
InitializeCriticalSection(&((file_crit*)file)->crit);
((file_crit*)file)->crit.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": file_crit.crit");
}
MSVCRT_stream_idx++;
}
return file;