From 04004676ca4207fc40067cae298077d74cb01cc9 Mon Sep 17 00:00:00 2001 From: Brandon Miller Date: Fri, 11 Apr 2025 08:12:29 -0400 Subject: 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 --- lang/c/pseudoc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/c/pseudoc.cpp') 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(); vector 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()) -- cgit v1.3.1