Commit 43e8e008 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp60: Fixed basic_istream::getline(basic_string) implementation.

parent a43840bc
...@@ -7617,9 +7617,9 @@ basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim( ...@@ -7617,9 +7617,9 @@ basic_istream_char* __cdecl basic_istream_char_getline_bstr_delim(
TRACE("(%p %p %c)\n", istream, str, delim); TRACE("(%p %p %c)\n", istream, str, delim);
basic_string_char_clear(str);
if(basic_istream_char_sentry_create(istream, TRUE)) { if(basic_istream_char_sentry_create(istream, TRUE)) {
basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base); basic_streambuf_char *strbuf = basic_ios_char_rdbuf_get(base);
basic_string_char_clear(str);
c = basic_streambuf_char_sgetc(strbuf); c = basic_streambuf_char_sgetc(strbuf);
for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf)) for(; c!=(unsigned char)delim && c!=EOF; c = basic_streambuf_char_snextc(strbuf))
...@@ -8909,9 +8909,9 @@ basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim( ...@@ -8909,9 +8909,9 @@ basic_istream_wchar* __cdecl basic_istream_wchar_getline_bstr_delim(
TRACE("(%p %p %c)\n", istream, str, delim); TRACE("(%p %p %c)\n", istream, str, delim);
basic_string_wchar_clear(str);
if(basic_istream_wchar_sentry_create(istream, TRUE)) { if(basic_istream_wchar_sentry_create(istream, TRUE)) {
basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base); basic_streambuf_wchar *strbuf = basic_ios_wchar_rdbuf_get(base);
basic_string_wchar_clear(str);
c = basic_streambuf_wchar_sgetc(strbuf); c = basic_streambuf_wchar_sgetc(strbuf);
for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf)) for(; c!=delim && c!=WEOF; c = basic_streambuf_wchar_snextc(strbuf))
......
...@@ -153,7 +153,8 @@ void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len ...@@ -153,7 +153,8 @@ void __thiscall basic_string_char__Eos(basic_string_char *this, MSVCP_size_t len
void basic_string_char_clear(basic_string_char *this) void basic_string_char_clear(basic_string_char *this)
{ {
basic_string_char__Eos(this, 0); if(this->ptr)
basic_string_char__Eos(this, 0);
} }
/* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */ /* ?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAEX_N@Z */
...@@ -1865,7 +1866,8 @@ void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t l ...@@ -1865,7 +1866,8 @@ void __thiscall basic_string_wchar__Eos(basic_string_wchar *this, MSVCP_size_t l
void basic_string_wchar_clear(basic_string_wchar *this) void basic_string_wchar_clear(basic_string_wchar *this)
{ {
basic_string_wchar__Eos(this, 0); if(this->ptr)
basic_string_wchar__Eos(this, 0);
} }
/* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */ /* ?_Tidy@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@AAEX_N@Z */
......
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