2 Sep
2020
2 Sep
'20
4:31 p.m.
On 9/2/20 6:13 PM, Arkadiusz Hiler wrote:
+/* ?attach(a)ifstream@@QAEXH(a)Z */ +/* ?attach(a)ifstream@@QEAAXH(a)Z */ +DEFINE_THISCALL_WRAPPER(ifstream_attach, 8) +void __thiscall ifstream_attach(istream *this, filedesc fd) +{ + TRACE("(%p %d)\n", this, fd); + if (filebuf_attach(ifstream_rdbuf(this), fd) == NULL) + ios_clear(istream_get_ios(this), IOSTATE_failbit); The function should add failbit flag to current state (it shouldn't e.g. clear eof state). The same applies to all cases where failbit is set.
Thanks, Piotr