Browse Source

Aargl!! On equality, d==0! Might solve JSON-164?

pull/1/head Release_2.1.0-RC27
Roker 2 years ago
parent
commit
416ab7ac5b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      constant_time_algo.cc

+ 2
- 1
constant_time_algo.cc View File

@ -13,7 +13,8 @@ namespace pEp
d |= ( static_cast<unsigned>(a[idx]) ^ static_cast<unsigned>(b[idx]) );
}
return d != 0;
// if d is still 0, the strings are equal.
return d == 0;
}
} // end of namespace pEp

Loading…
Cancel
Save