From 2d54e2c4f3d6185d4b6757fc30a833a24cb2b5a4 Mon Sep 17 00:00:00 2001 From: "SND\\kernelnet_cp" Date: Mon, 17 Sep 2012 14:30:08 +0000 Subject: [PATCH] [0.2.x] fixed : long DML output corruption git-svn-id: https://pykd.svn.codeplex.com/svn@79644 9b283d60-5439-405e-af05-b73fd8c4d996 --- pykd/win/dbgio.cpp | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/pykd/win/dbgio.cpp b/pykd/win/dbgio.cpp index d8c85d8..6e40704 100644 --- a/pykd/win/dbgio.cpp +++ b/pykd/win/dbgio.cpp @@ -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, - L"%ws", - str.substr( i*100, min( str.size() - i*100, 100 ) ).c_str() - ); - } + g_dbgEng->control->ControlledOutputWide( + dml ? DEBUG_OUTCTL_AMBIENT_DML : DEBUG_OUTCTL_AMBIENT_TEXT, + DEBUG_OUTPUT_NORMAL, + L"%ws", + 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() - ); - } + g_dbgEng->control->OutputWide( + DEBUG_OUTPUT_ERROR, + L"%ws", + str.c_str() + ); + } else {