WPCubed Product Support

TWPAttrCache doesn't seem to work anymore

I'm not sure if this is important, users haven't experienced any negative effects from it, but it seems flawed.

When debugging i noticed the FCacheCount going very high. I've traced it back to the following code inside function TWPAttrCache.GetIndex(const CharAttr: TWPCharAttr): Integer;

if (FCache[i].MaskHash = CmpHashCode) and        CompareMem(@(FCache[i].Values[1]), @(CharAttr.Values[1]), 16 * SizeOf(word)) then      begin

In WpTools 5 this used to be:

if (FCache[i].MaskHash and $FFFF) = (CmpHashCode and $FFFF) then

The WP6 condition never seems to evaluate to true because FCache[i].MaskHash <> CmpHashCode
I haven't looked further into why this fails.

WpTools 6.13.1

#1 ♥ 0
3.4k Views 2 users read 1 min
support

Thank You,

if (FCache[i].MaskHash and $FFFF = CmpHashCode and $FFFF) and
CompareMem(@(FCache[i].Values[1]), @(CharAttr.Values[1]), 16 * SizeOf(word)) then

is certainly correct - thanks for finding this problem.

Julian

#2 ♥ 0
This category is archived. No new posts are possible.