From 717a2ea5c79a95dd3178447e27be979895f55892 Mon Sep 17 00:00:00 2001 From: Ryan Snyder Date: Mon, 28 Oct 2024 15:02:01 -0400 Subject: hlr: expose ability to claim line addresses --- lang/c/pseudoc.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lang/c') diff --git a/lang/c/pseudoc.cpp b/lang/c/pseudoc.cpp index 8de510a7..4f2174d6 100644 --- a/lang/c/pseudoc.cpp +++ b/lang/c/pseudoc.cpp @@ -681,6 +681,11 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H auto function = m_highLevelIL->GetFunction(); if (instr.ast) tokens.PrependCollapseIndicator(function, instr); + + // ensure we claim the line address for top level instrs on a line + if (instr.operation != HLIL_BLOCK) + tokens.InitLine(); + switch (instr.operation) { case HLIL_BLOCK: -- cgit v1.3.1