[0.2.x] fixed : issue #12068 ( windbg crash at loadWStr(0) )

git-svn-id: https://pykd.svn.codeplex.com/svn@84891 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2013-08-22 12:40:25 +00:00 committed by Mikhail I. Izmestev
parent 95d1365233
commit 3e271a7c1a

View File

@ -185,6 +185,9 @@ std::wstring loadWStr( ULONG64 offset )
0, 0,
&strLength ); &strLength );
if ( FAILED( hres ) )
throw MemoryException( offset );
std::vector<wchar_t> buffer(strLength); std::vector<wchar_t> buffer(strLength);
hres = hres =
@ -195,8 +198,7 @@ std::wstring loadWStr( ULONG64 offset )
strLength, strLength,
NULL ); NULL );
if ( FAILED( hres ) )
throw MemoryException( offset );
return std::wstring( &buffer[0] ); return std::wstring( &buffer[0] );
} }