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/rust/pseudorust.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lang/rust/pseudorust.cpp') diff --git a/lang/rust/pseudorust.cpp b/lang/rust/pseudorust.cpp index a1f7defe..300297dc 100644 --- a/lang/rust/pseudorust.cpp +++ b/lang/rust/pseudorust.cpp @@ -1686,7 +1686,7 @@ void PseudoRustFunction::GetExprText(const HighLevelILInstruction& instr, HighLe srcPrecedence = LowUnaryOperatorPrecedence; vector pointerTokens{}; - if (AppendPointerTextToken(srcExpr, constant, pointerTokens, settings, DereferenceNonDataSymbols, srcPrecedence) == DataSymbolResult) + if (AppendPointerTextToken(instr, constant, pointerTokens, settings, DereferenceNonDataSymbols, srcPrecedence) == DataSymbolResult) { if (type && type->GetClass() == PointerTypeClass && instr.size != type->GetChildType()->GetWidth()) { -- cgit v1.3.1