bug in CreateVariable()?
Brought to you by:
japheth
There is a problem with the string functions SIZESTR and INSTR, when the target equate already exist and holds a negative value. In this cases the result of the string function is also negative. Example:
;-----------
foostr TEXTEQU <xyz>
foo SIZESTR foostr
%echo @CatStr(%foo)
IF foo GT 1
echo foo GT 1
ELSE
echo should be dead code
ENDIF
foo = foo - 100 ; <--- does set asym.value3264 to -1
foo SIZESTR foostr ; <-- CreateVariable() does not zero asym.value3264, if equate already exist.
%echo @CatStr(%foo)
IF foo GT 1
echo foo GT 1
ELSE
echo should be dead code
ENDIF
foo INSTR foostr,
%echo looks nice: @CatStr(%foo)
;-----------
regards, qWord
sorry, the first line of the eaxmple should be:
foostr TEXTEQU <xyz>