[0.2.x] fixed : long DML output corruption

git-svn-id: https://pykd.svn.codeplex.com/svn@79644 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-09-17 14:30:08 +00:00 committed by Mikhail I. Izmestev
parent e759e869c8
commit 2d54e2c4f3

View File

@ -14,14 +14,13 @@ void dprint( const std::wstring &str, bool dml )
{
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
for ( size_t i = 0; i < str.size() / 100 + 1; ++i )
{
g_dbgEng->control->ControlledOutputWide(
dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, DEBUG_OUTPUT_NORMAL,
dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT,
DEBUG_OUTPUT_NORMAL,
L"%ws",
str.substr( i*100, min( str.size() - i*100, 100 ) ).c_str()
str.c_str()
);
}
}
else
{
@ -45,14 +44,12 @@ void eprint( const std::wstring &str )
{
PyThread_StateRestore pyThreadRestore( g_dbgEng->pystate );
for ( size_t i = 0; i < str.size() / 100 + 1; ++i )
{
g_dbgEng->control->OutputWide(
DEBUG_OUTPUT_ERROR,
L"%ws",
str.substr( i*100, min( str.size() - i*100, 100 ) ).c_str()
str.c_str()
);
}
}
else
{