msvcirt: Set error when file can't be opened in ifstream_open_ctor.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
390b885c74
commit
a6223249b4
|
@ -4213,12 +4213,13 @@ istream* __thiscall ifstream_open_ctor(istream *this, const char *name, ios_open
|
|||
|
||||
filebuf_ctor(fb);
|
||||
istream_sb_ctor(this, &fb->base, virt_init);
|
||||
filebuf_open(fb, name, mode|OPENMODE_in, protection);
|
||||
|
||||
base = istream_get_ios(this);
|
||||
base->vtable = &MSVCP_ifstream_vtable;
|
||||
base->delbuf = 1;
|
||||
|
||||
if (!filebuf_open(fb, name, mode|OPENMODE_in, protection))
|
||||
base->state |= IOSTATE_failbit;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue