Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
elfmz committed Sep 17, 2024
1 parent 7b5fb8e commit d0340a8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions far2l/src/hilight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,15 +1069,21 @@ static bool operator==(const HighlightDataColor &hl1, const HighlightDataColor &
if (hl1.MarkLen && wmemcmp(&hl1.Mark[0], &hl2.Mark[0], hl1.MarkLen) != 0)
return false;

return (hl1.Color == hl2.Color && hl1.Mask == hl2.Mask);
if (memcmp(hl1.Color, hl2.Color, sizeof(hl2.Color)) != 0)
return false;

if (memcmp(hl1.Mask, hl2.Mask, sizeof(hl2.Mask)) != 0)
return false;

return true;
}


struct HighlightDataColorHash
{
size_t operator()(const HighlightDataColor &hl) const
{
size_t out = hl.MarkLen * 0xFFFF;
size_t out = hl.Flags ^ (hl.MarkLen * 0xFFFF);

for (size_t i = 0; i < ARRAYSIZE(hl.Color); ++i) {
for (size_t j = 0; j < ARRAYSIZE(hl.Color[i]); ++j) {
Expand Down

0 comments on commit d0340a8

Please sign in to comment.