diff --git a/Cpp2IL.Core/ProcessingLayers/CallAnalysisProcessingLayer.cs b/Cpp2IL.Core/ProcessingLayers/CallAnalysisProcessingLayer.cs index 9250594a..e83af639 100644 --- a/Cpp2IL.Core/ProcessingLayers/CallAnalysisProcessingLayer.cs +++ b/Cpp2IL.Core/ProcessingLayers/CallAnalysisProcessingLayer.cs @@ -96,7 +96,7 @@ private static void InjectAttribute(ApplicationAnalysisContext appContext) { continue; } - if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand) + if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand && operand.Value is not string) { var address = operand.Value.ToUInt64(null); if (appContext.MethodsByAddress.TryGetValue(address, out var list)) diff --git a/Cpp2IL.Core/ProcessingLayers/NativeMethodDetectionProcessingLayer.cs b/Cpp2IL.Core/ProcessingLayers/NativeMethodDetectionProcessingLayer.cs index 7a846156..d03d40c0 100644 --- a/Cpp2IL.Core/ProcessingLayers/NativeMethodDetectionProcessingLayer.cs +++ b/Cpp2IL.Core/ProcessingLayers/NativeMethodDetectionProcessingLayer.cs @@ -86,7 +86,7 @@ private static void AnalyzeMethod(ApplicationAnalysisContext appContext, MethodA private static bool TryGetAddressFromInstruction(InstructionSetIndependentInstruction instruction, out ulong address) { - if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand) + if (instruction.Operands.Length > 0 && instruction.Operands[0].Data is IsilImmediateOperand operand && operand.Value is not string) { address = operand.Value.ToUInt64(null); return true;