dbghelp: Fix the threads stream size.

This commit is contained in:
Eric Pouech 2009-11-13 13:18:12 +01:00 committed by Alexandre Julliard
parent e7590fcfb5
commit aa9002755a
1 changed files with 3 additions and 4 deletions

View File

@ -723,7 +723,7 @@ static unsigned dump_threads(struct dump_context* dc,
{ {
MINIDUMP_THREAD mdThd; MINIDUMP_THREAD mdThd;
MINIDUMP_THREAD_LIST mdThdList; MINIDUMP_THREAD_LIST mdThdList;
unsigned i; unsigned i, sz;
RVA rva_base; RVA rva_base;
DWORD flags_out; DWORD flags_out;
CONTEXT ctx; CONTEXT ctx;
@ -731,8 +731,7 @@ static unsigned dump_threads(struct dump_context* dc,
mdThdList.NumberOfThreads = 0; mdThdList.NumberOfThreads = 0;
rva_base = dc->rva; rva_base = dc->rva;
dc->rva += sizeof(mdThdList.NumberOfThreads) + dc->rva += sz = sizeof(mdThdList.NumberOfThreads) + dc->spi->dwThreadCount * sizeof(mdThd);
dc->spi->dwThreadCount * sizeof(mdThd);
for (i = 0; i < dc->spi->dwThreadCount; i++) for (i = 0; i < dc->spi->dwThreadCount; i++)
{ {
@ -800,7 +799,7 @@ static unsigned dump_threads(struct dump_context* dc,
writeat(dc, rva_base, writeat(dc, rva_base,
&mdThdList.NumberOfThreads, sizeof(mdThdList.NumberOfThreads)); &mdThdList.NumberOfThreads, sizeof(mdThdList.NumberOfThreads));
return dc->rva - rva_base; return sz;
} }
/****************************************************************** /******************************************************************