We recently updated to latest version 9.2, and WPRTEDefs.TWPTextObj.CompareName evaluates differently. One example:
Name = *spFromFields.fromName, aText = *spToFields.toName.
Code:
b := Copy(aText, 1, i - 1);
a := Copy(aText, Length(aText) - i - 1 ,Length(aText) - i);
aa := Copy(Name, Length(Name)-Length(a)+1, Length(a));
Result:= ((i = 1) or (CompareText(b, Copy(Name, 1, i - 1)) = 0)) and (CompareText(aa,a) = 0);
local variable b = ''
local variable a = 'ame'
local variable aa = 'ame'
Result = True
In the version we had been using, the evaluation wasn't broken into local variables, and Result was properly False.
Is this a known issue that can be fixed, without us changing the source code?
Thanks