msvcp60: Don't set failbit in basic_istream::tellg.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Piotr Caban 2018-07-19 18:00:04 +02:00 committed by Alexandre Julliard
parent 98bc9fdaa4
commit bb264a0ac6
2 changed files with 8 additions and 5 deletions

View File

@ -8347,9 +8347,6 @@ fpos_int* __thiscall basic_istream_char_tellg(basic_istream_char *this, fpos_int
basic_streambuf_char_pubseekoff(basic_ios_char_rdbuf_get(base),
ret, 0, SEEKDIR_cur, OPENMODE_in);
if(ret->off==-1 && ret->pos==0 && ret->state==0)
basic_ios_char_setstate(base, IOSTATE_failbit);
return ret;
}
@ -9846,8 +9843,6 @@ fpos_int* __thiscall basic_istream_wchar_tellg(basic_istream_wchar *this, fpos_i
basic_streambuf_wchar_pubseekoff(basic_ios_wchar_rdbuf_get(base),
ret, 0, SEEKDIR_cur, OPENMODE_in);
if(ret->off==-1 && ret->pos==0 && ret->state==0)
basic_ios_wchar_setstate(base, IOSTATE_failbit);
return ret;
}

View File

@ -1428,6 +1428,10 @@ static void test_istream_tellg(void)
ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", wine_dbgstr_longlong(tpos.pos));
ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state);
if(tests[i].seekoff == -1) {
ok(ss.basic_ios.base.state == IOSTATE_goodbit,
"ss.basic_ios.base.state = %x\n", ss.basic_ios.base.state);
}
call_func1(p_basic_stringstream_char_vbase_dtor, &ss);
call_func1(p_basic_string_char_dtor, &str);
@ -1453,6 +1457,10 @@ static void test_istream_tellg(void)
ok(rpos == &tpos, "wrong return fpos, expected = %p found = %p\n", rpos, &tpos);
ok(tpos.pos == 0, "wrong position, expected = 0 found = %s\n", wine_dbgstr_longlong(tpos.pos));
ok(tpos.state == 0, "wrong state, expected = 0 found = %d\n", tpos.state);
if(tests[i].seekoff == -1) {
ok(ss.basic_ios.base.state == IOSTATE_goodbit,
"ss.basic_ios.base.state = %x\n", ss.basic_ios.base.state);
}
call_func1(p_basic_stringstream_wchar_vbase_dtor, &wss);
call_func1(p_basic_string_wchar_dtor, &wstr);