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
This commit is contained in:
qWord 2016-05-06 19:31:13 +02:00
parent 7338d820d4
commit 33e0c070c7

View File

@ -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 );
}