From 33e0c070c79010d5027b43e6f91de07b888bc546 Mon Sep 17 00:00:00 2001 From: qWord Date: Fri, 6 May 2016 19:31:13 +0200 Subject: [PATCH] Reuse of equates in CreateVariable was erroneous If an equate already exist CreateVariable did not zero bits 32...63 of that equate. This cause that the predefined macros SIZESTR and INSTR return wrong values when the result-equate (for example) did contain negative values before macro invocation. Fixed by setting sym->value3264 to zero in case of reuse. Resolves: #156 resp. SF-BUG-303 --- equate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/equate.c b/equate.c index b4b4b61..4631cb1 100644 --- a/equate.c +++ b/equate.c @@ -317,6 +317,7 @@ struct asym *CreateVariable( const char *name, int value ) //sym->mem_type = MT_ABS; sym->variable = TRUE; sym->value = value; + sym->value3264 = 0; sym->isequate = TRUE; return( sym ); }