summaryrefslogtreecommitdiff
path: root/lang/c
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2024-10-28 15:02:01 -0400
committerRyan Snyder <ryan@vector35.com>2024-10-28 19:36:05 -0400
commit717a2ea5c79a95dd3178447e27be979895f55892 (patch)
treeb900a836bb18087aae5d50968ea4a2671b60bbd9 /lang/c
parentc0e99630986903c6988b7fdbf4f69a3389c71d76 (diff)
hlr: expose ability to claim line addresses
Diffstat (limited to 'lang/c')
-rw-r--r--lang/c/pseudoc.cpp5
1 files changed, 5 insertions, 0 deletions
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: