Commit bb264a0a authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

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

parent 98bc9fda
......@@ -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;
}
......
......@@ -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);
......
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