Commit 4c73236d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcp90: Fix off by one issues in basic_string functions operating on iterators.

parent 0d3dcd23
...@@ -841,7 +841,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_iter, 20) ...@@ -841,7 +841,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_iter, 20)
basic_string_char* __thiscall MSVCP_basic_string_char_assign_iter(basic_string_char *this, basic_string_char* __thiscall MSVCP_basic_string_char_assign_iter(basic_string_char *this,
String_iterator_char beg, String_iterator_char end) String_iterator_char beg, String_iterator_char end)
{ {
return MSVCP_basic_string_char_assign_ptr_ptr(this, beg.pos, end.pos+1); return MSVCP_basic_string_char_assign_ptr_ptr(this, beg.pos, end.pos);
} }
/* ?_Chassign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXIID@Z */ /* ?_Chassign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEXIID@Z */
...@@ -1060,7 +1060,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_iter, 20) ...@@ -1060,7 +1060,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_iter, 20)
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_iter(basic_string_char *this, basic_string_char* __thiscall MSVCP_basic_string_char_ctor_iter(basic_string_char *this,
String_iterator_char beg, String_iterator_char end) String_iterator_char beg, String_iterator_char end)
{ {
return MSVCP_basic_string_char_ctor_cstr_len(this, beg.pos, end.pos-beg.pos+1); return MSVCP_basic_string_char_ctor_cstr_len(this, beg.pos, end.pos-beg.pos);
} }
/* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */ /* ??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ */
...@@ -1224,7 +1224,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_iter, 20) ...@@ -1224,7 +1224,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_iter, 20)
basic_string_char* __thiscall MSVCP_basic_string_char_append_iter( basic_string_char* __thiscall MSVCP_basic_string_char_append_iter(
basic_string_char *this, String_iterator_char beg, String_iterator_char end) basic_string_char *this, String_iterator_char beg, String_iterator_char end)
{ {
return MSVCP_basic_string_char_append_cstr_len(this, beg.pos, end.pos-beg.pos+1); return MSVCP_basic_string_char_append_cstr_len(this, beg.pos, end.pos-beg.pos);
} }
/* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */ /* ?append@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@ID@Z */
...@@ -2680,7 +2680,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_iter, 20) ...@@ -2680,7 +2680,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_iter, 20)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_iter(basic_string_wchar *this, basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_iter(basic_string_wchar *this,
String_iterator_wchar beg, String_iterator_wchar end) String_iterator_wchar beg, String_iterator_wchar end)
{ {
return MSVCP_basic_string_wchar_assign_ptr_ptr(this, beg.pos, end.pos+1); return MSVCP_basic_string_wchar_assign_ptr_ptr(this, beg.pos, end.pos);
} }
/* ?_Chassign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXII_W@Z */ /* ?_Chassign@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@IAEXII_W@Z */
...@@ -2939,7 +2939,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_iter, 20) ...@@ -2939,7 +2939,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_iter, 20)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_iter(basic_string_wchar *this, basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_iter(basic_string_wchar *this,
String_iterator_wchar beg, String_iterator_wchar end) String_iterator_wchar beg, String_iterator_wchar end)
{ {
return MSVCP_basic_string_wchar_ctor_cstr_len(this, beg.pos, end.pos-beg.pos+1); return MSVCP_basic_string_wchar_ctor_cstr_len(this, beg.pos, end.pos-beg.pos);
} }
/* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */ /* ??1?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAE@XZ */
...@@ -3133,7 +3133,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_iter, 20) ...@@ -3133,7 +3133,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_iter, 20)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_iter( basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_iter(
basic_string_wchar *this, String_iterator_wchar beg, String_iterator_wchar end) basic_string_wchar *this, String_iterator_wchar beg, String_iterator_wchar end)
{ {
return MSVCP_basic_string_wchar_append_cstr_len(this, beg.pos, end.pos-beg.pos+1); return MSVCP_basic_string_wchar_append_cstr_len(this, beg.pos, end.pos-beg.pos);
} }
/* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@Z */ /* ?append@?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@QAEAAV12@I_W@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