Commit 19342f43 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

msvcirt: Set error when file can't be opened in fstream_open_ctor.

parent da4dc79d
......@@ -4627,13 +4627,14 @@ iostream* __thiscall fstream_open_ctor(iostream *this, const char *name, ios_ope
}
filebuf_ctor(fb);
filebuf_open(fb, name, mode, protection);
iostream_internal_sb_ctor(this, &fb->base, &MSVCP_fstream_vtable, virt_init);
base = istream_get_ios(&this->base1);
base->delbuf = 1;
if (!filebuf_open(fb, name, mode, protection))
base->state |= IOSTATE_failbit;
return this;
}
......
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