From 79a1a18406823c082c83598ad9cdfd5db0b22ab2 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Wed, 20 Apr 2011 00:19:52 +0000 Subject: [PATCH] Fixed handling of constants --- src/arch.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/arch.c b/src/arch.c index b29e967..9dc46d0 100644 --- a/src/arch.c +++ b/src/arch.c @@ -268,8 +268,12 @@ static int _call_operands_constant(ArchOperandDefinition definition, AO_GET_VALUE(definition), operand->value.immediate.value); #endif - return (AO_GET_VALUE(definition) == operand->value.immediate.value) - ? 0 : -1; + if(AO_GET_VALUE(definition) != operand->value.immediate.value) + return -1; + /* set this operand as a constant */ + operand->type &= AOM_TYPE; + operand->type |= AOT_CONSTANT; + return 0; } static int _call_operands_dregister(Arch * arch,