Commit 66520ea0 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix FILE critical section initialization.

parent 3d028ab6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment