msvcp: Fixed displaying of not NULL-terminated strings in debug traces.

This commit is contained in:
Piotr Caban 2012-09-12 13:27:42 +02:00 committed by Alexandre Julliard
parent 8dacc816eb
commit dadc409bae
3 changed files with 36 additions and 36 deletions

View File

@ -483,7 +483,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12)
basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len(
basic_string_char *this, const char *str, MSVCP_size_t len)
{
TRACE("%p %s %lu\n", this, debugstr_a(str), len);
TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
if(basic_string_char_inside(this, str))
return MSVCP_basic_string_char_assign_substr(this, this,
@ -677,7 +677,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12)
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(
basic_string_char *this, const char *str, MSVCP_size_t len)
{
TRACE("%p %s %ld\n", this, debugstr_a(str), len);
TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
basic_string_char_tidy(this, FALSE, 0);
MSVCP_basic_string_char_assign_cstr_len(this, str, len);
@ -885,7 +885,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12)
basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len(
basic_string_char *this, const char *append, MSVCP_size_t count)
{
TRACE("%p %s %lu\n", this, debugstr_a(append), count);
TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
if(basic_string_char_inside(this, append))
return MSVCP_basic_string_char_append_substr(this, this,
@ -972,7 +972,7 @@ int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len(
{
int ans;
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_a(str), count);
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
if(this->size < pos)
MSVCP__String_base_Xran();
@ -1060,7 +1060,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_substr(
{
const char *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
if(len==0 && pos<=this->size)
return pos;
@ -1115,7 +1115,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
{
const char *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
if(len==0)
return pos<this->size ? pos : this->size;
@ -2106,7 +2106,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len(
basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
{
TRACE("%p %s %lu\n", this, debugstr_w(str), len);
TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
if(basic_string_wchar_inside(this, str))
return MSVCP_basic_string_wchar_assign_substr(this, this,
@ -2336,7 +2336,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(
basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
{
TRACE("%p %s %ld\n", this, debugstr_w(str), len);
TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
basic_string_wchar_tidy(this, FALSE, 0);
MSVCP_basic_string_wchar_assign_cstr_len(this, str, len);
@ -2582,7 +2582,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len(
basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
{
TRACE("%p %s %lu\n", this, debugstr_w(append), count);
TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
if(basic_string_wchar_inside(this, append))
return MSVCP_basic_string_wchar_append_substr(this, this,
@ -2685,7 +2685,7 @@ int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len(
{
int ans;
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_w(str), count);
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
if(this->size < pos)
MSVCP__String_base_Xran();
@ -2785,7 +2785,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr(
{
const wchar_t *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
if(len==0 && pos<=this->size)
return pos;
@ -2848,7 +2848,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
{
const wchar_t *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
if(len==0)
return pos<this->size ? pos : this->size;

View File

@ -350,7 +350,7 @@ DEFINE_THISCALL_WRAPPER(basic_string_char_assign_cstr_len, 12)
basic_string_char* __thiscall basic_string_char_assign_cstr_len(
basic_string_char *this, const char *str, MSVCP_size_t len)
{
TRACE("%p %s %lu\n", this, debugstr_a(str), len);
TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
if(basic_string_char_inside(this, str))
return basic_string_char_assign_substr(this, this, str-this->ptr, len);
@ -424,7 +424,7 @@ DEFINE_THISCALL_WRAPPER(basic_string_char_ctor_cstr_len_alloc, 16)
basic_string_char* __thiscall basic_string_char_ctor_cstr_len_alloc(
basic_string_char *this, const char *str, MSVCP_size_t len, const void *alloc)
{
TRACE("%p %s %ld\n", this, debugstr_a(str), len);
TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
basic_string_char__Tidy(this, FALSE);
basic_string_char_assign_cstr_len(this, str, len);
@ -544,7 +544,7 @@ int __thiscall basic_string_char_compare_substr_cstr_len(
{
int ans;
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_a(str), count);
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
if(this->size < pos)
_Xran();
@ -812,7 +812,7 @@ MSVCP_size_t __thiscall basic_string_char_find_cstr_substr(
{
const char *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
if(len==0 && pos<=this->size)
return pos;
@ -866,7 +866,7 @@ MSVCP_size_t __thiscall basic_string_char_rfind_cstr_substr(
{
const char *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
if(len==0)
return pos<this->size ? pos : this->size;
@ -1147,7 +1147,7 @@ DEFINE_THISCALL_WRAPPER(basic_string_char_append_cstr_len, 12)
basic_string_char* __thiscall basic_string_char_append_cstr_len(
basic_string_char *this, const char *append, MSVCP_size_t count)
{
TRACE("%p %s %lu\n", this, debugstr_a(append), count);
TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
if(basic_string_char_inside(this, append))
return basic_string_char_append_substr(this, this, append-this->ptr, count);
@ -2046,7 +2046,7 @@ DEFINE_THISCALL_WRAPPER(basic_string_wchar_assign_cstr_len, 12)
basic_string_wchar* __thiscall basic_string_wchar_assign_cstr_len(
basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
{
TRACE("%p %s %lu\n", this, debugstr_w(str), len);
TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
if(basic_string_wchar_inside(this, str))
return basic_string_wchar_assign_substr(this, this, str-this->ptr, len);
@ -2120,7 +2120,7 @@ DEFINE_THISCALL_WRAPPER(basic_string_wchar_ctor_cstr_len_alloc, 16)
basic_string_wchar* __thiscall basic_string_wchar_ctor_cstr_len_alloc(
basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len, const void *alloc)
{
TRACE("%p %s %ld\n", this, debugstr_w(str), len);
TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
basic_string_wchar__Tidy(this, FALSE);
basic_string_wchar_assign_cstr_len(this, str, len);
@ -2234,7 +2234,7 @@ int __thiscall basic_string_wchar_compare_substr_cstr_len(
{
int ans;
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_w(str), count);
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
if(this->size < pos)
_Xran();
@ -2502,7 +2502,7 @@ MSVCP_size_t __thiscall basic_string_wchar_find_cstr_substr(
{
const wchar_t *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
if(len==0 && pos<=this->size)
return pos;
@ -2556,7 +2556,7 @@ MSVCP_size_t __thiscall basic_string_wchar_rfind_cstr_substr(
{
const wchar_t *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
if(len==0)
return pos<this->size ? pos : this->size;
@ -2837,7 +2837,7 @@ DEFINE_THISCALL_WRAPPER(basic_string_wchar_append_cstr_len, 12)
basic_string_wchar* __thiscall basic_string_wchar_append_cstr_len(
basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
{
TRACE("%p %s %lu\n", this, debugstr_w(append), count);
TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
if(basic_string_wchar_inside(this, append))
return basic_string_wchar_append_substr(this, this, append-this->ptr, count);

View File

@ -777,7 +777,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_assign_cstr_len, 12)
basic_string_char* __thiscall MSVCP_basic_string_char_assign_cstr_len(
basic_string_char *this, const char *str, MSVCP_size_t len)
{
TRACE("%p %s %lu\n", this, debugstr_a(str), len);
TRACE("%p %s %lu\n", this, debugstr_an(str, len), len);
if(basic_string_char_inside(this, str))
return MSVCP_basic_string_char_assign_substr(this, this,
@ -971,7 +971,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_ctor_cstr_len, 12)
basic_string_char* __thiscall MSVCP_basic_string_char_ctor_cstr_len(
basic_string_char *this, const char *str, MSVCP_size_t len)
{
TRACE("%p %s %ld\n", this, debugstr_a(str), len);
TRACE("%p %s %ld\n", this, debugstr_an(str, len), len);
basic_string_char_tidy(this, FALSE, 0);
MSVCP_basic_string_char_assign_cstr_len(this, str, len);
@ -1179,7 +1179,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_char_append_cstr_len, 12)
basic_string_char* __thiscall MSVCP_basic_string_char_append_cstr_len(
basic_string_char *this, const char *append, MSVCP_size_t count)
{
TRACE("%p %s %lu\n", this, debugstr_a(append), count);
TRACE("%p %s %lu\n", this, debugstr_an(append, count), count);
if(basic_string_char_inside(this, append))
return MSVCP_basic_string_char_append_substr(this, this,
@ -1326,7 +1326,7 @@ int __thiscall MSVCP_basic_string_char_compare_substr_cstr_len(
{
int ans;
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_a(str), count);
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_an(str, count), count);
if(this->size < pos)
MSVCP__String_base_Xran();
@ -1558,7 +1558,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_find_cstr_substr(
{
const char *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
if(len==0 && pos<=this->size)
return pos;
@ -1613,7 +1613,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_char_rfind_cstr_substr(
{
const char *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_a(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_an(find, len), pos, len);
if(len==0)
return pos<this->size ? pos : this->size;
@ -2611,7 +2611,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_assign_cstr_len, 12)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_assign_cstr_len(
basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
{
TRACE("%p %s %lu\n", this, debugstr_w(str), len);
TRACE("%p %s %lu\n", this, debugstr_wn(str, len), len);
if(basic_string_wchar_inside(this, str))
return MSVCP_basic_string_wchar_assign_substr(this, this,
@ -2841,7 +2841,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_ctor_cstr_len, 12)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_ctor_cstr_len(
basic_string_wchar *this, const wchar_t *str, MSVCP_size_t len)
{
TRACE("%p %s %ld\n", this, debugstr_w(str), len);
TRACE("%p %s %ld\n", this, debugstr_wn(str, len), len);
basic_string_wchar_tidy(this, FALSE, 0);
MSVCP_basic_string_wchar_assign_cstr_len(this, str, len);
@ -3087,7 +3087,7 @@ DEFINE_THISCALL_WRAPPER(MSVCP_basic_string_wchar_append_cstr_len, 12)
basic_string_wchar* __thiscall MSVCP_basic_string_wchar_append_cstr_len(
basic_string_wchar *this, const wchar_t *append, MSVCP_size_t count)
{
TRACE("%p %s %lu\n", this, debugstr_w(append), count);
TRACE("%p %s %lu\n", this, debugstr_wn(append, count), count);
if(basic_string_wchar_inside(this, append))
return MSVCP_basic_string_wchar_append_substr(this, this,
@ -3260,7 +3260,7 @@ int __thiscall MSVCP_basic_string_wchar_compare_substr_cstr_len(
{
int ans;
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_w(str), count);
TRACE("%p %lu %lu %s %lu\n", this, pos, num, debugstr_wn(str, count), count);
if(this->size < pos)
MSVCP__String_base_Xran();
@ -3540,7 +3540,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_find_cstr_substr(
{
const wchar_t *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
if(len==0 && pos<=this->size)
return pos;
@ -3603,7 +3603,7 @@ MSVCP_size_t __thiscall MSVCP_basic_string_wchar_rfind_cstr_substr(
{
const wchar_t *p, *end;
TRACE("%p %s %lu %lu\n", this, debugstr_w(find), pos, len);
TRACE("%p %s %lu %lu\n", this, debugstr_wn(find, len), pos, len);
if(len==0)
return pos<this->size ? pos : this->size;