Brendan McGrath brendan@redmandi.com wrote:
struct nt
{
DWORD Signature;
IMAGE_FILE_HEADER FileHeader;
union
{
IMAGE_OPTIONAL_HEADER32 hdr32;
IMAGE_OPTIONAL_HEADER64 hdr64;
} opt;
};
struct nt *nt = (struct nt*) RtlImageNtHeader( NtCurrentTeb()->Peb->ImageBaseAddress );
- if (nt->opt.hdr32.Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) {
if (!reserve_size) reserve_size = nt->opt.hdr32.SizeOfStackReserve;
if (!commit_size) commit_size = nt->opt.hdr32.SizeOfStackCommit;
- } else {
if (!reserve_size) reserve_size = nt->opt.hdr64.SizeOfStackReserve;
if (!commit_size) commit_size = nt->opt.hdr64.SizeOfStackCommit;
- }
- TRACE("reserve_size: %lu, commit_size: %lu", reserve_size, commit_size);
Indentation seems to be broken by shifting lower lines by 1 space left.