Commit d6dff398 authored by Alexandre Julliard's avatar Alexandre Julliard

Release unused space in debug strings to avoid too frequent

wrap-arounds in the circular buffer.
parent 23ce7f10
......@@ -52,6 +52,15 @@ gimme1 (int n)
/* ---------------------------------------------------------------------- */
/* release extra space that we requested in gimme1() */
static inline void release( void *ptr )
{
struct debug_info *info = NtCurrentTeb()->debug_info;
info->str_pos = ptr;
}
/* ---------------------------------------------------------------------- */
LPCSTR debugstr_an (LPCSTR src, int n)
{
LPSTR dst, res;
......@@ -89,7 +98,8 @@ LPCSTR debugstr_an (LPCSTR src, int n)
*dst++ = '.';
*dst++ = '.';
}
*dst = '\0';
*dst++ = '\0';
release( dst );
return res;
}
......@@ -132,7 +142,8 @@ LPCSTR debugstr_wn (LPCWSTR src, int n)
*dst++ = '.';
*dst++ = '.';
}
*dst = '\0';
*dst++ = '\0';
release( dst );
return res;
}
......
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