diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/windows/pdb_source_line_writer.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/windows/pdb_source_line_writer.cc b/src/common/windows/pdb_source_line_writer.cc index 31920ba7..363ce7d8 100644 --- a/src/common/windows/pdb_source_line_writer.cc +++ b/src/common/windows/pdb_source_line_writer.cc @@ -1166,12 +1166,15 @@ int PDBSourceLineWriter::GetFunctionStackParamSize(IDiaSymbol *function) { goto next_child; } - int child_end = child_register_offset + static_cast<ULONG>(child_length); - if (child_register_offset < lowest_base) { - lowest_base = child_register_offset; - } - if (child_end > highest_end) { - highest_end = child_end; + // Extra scope to avoid goto jumping over variable initialization + { + int child_end = child_register_offset + static_cast<ULONG>(child_length); + if (child_register_offset < lowest_base) { + lowest_base = child_register_offset; + } + if (child_end > highest_end) { + highest_end = child_end; + } } next_child: |