summaryrefslogtreecommitdiff
path: root/lang/c
diff options
context:
space:
mode:
authorBrandon Miller <brandon@vector35.com>2025-04-11 08:12:29 -0400
committerBrandon Miller <brandon@vector35.com>2025-04-11 08:13:56 -0400
commit04004676ca4207fc40067cae298077d74cb01cc9 (patch)
treef244e0dd4255a72c12c67c12562c57399655e1ad /lang/c
parent7769c88e8f72b2a0ca01b7f1fa7d8a8c69a6010e (diff)
Fix pseudo C and rust type cast on HLIL_DEREF
Should be using the instruction size of the HLIL_DEREF instruction, not the size of the HLIL_DEREF's source expression
Diffstat (limited to 'lang/c')
-rw-r--r--lang/c/pseudoc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lang/c/pseudoc.cpp b/lang/c/pseudoc.cpp
index 52622f57..ac1fe3bb 100644
--- a/lang/c/pseudoc.cpp
+++ b/lang/c/pseudoc.cpp
@@ -1614,7 +1614,7 @@ void PseudoCFunction::GetExprTextInternal(const HighLevelILInstruction& instr, H
const auto constant = srcExpr.GetConstant<HLIL_CONST_PTR>();
vector<InstructionTextToken> pointerTokens{};
- if (AppendPointerTextToken(srcExpr, constant, pointerTokens, settings, DereferenceNonDataSymbols, precedence) == DataSymbolResult)
+ if (AppendPointerTextToken(instr, constant, pointerTokens, settings, DereferenceNonDataSymbols, precedence) == DataSymbolResult)
{
const auto type = srcExpr.GetType();
if (type && type->GetClass() == PointerTypeClass && instr.size != type->GetChildType()->GetWidth())