Browse Source
If two keys are the same length, but don't share the same sequence of characters, we were incorrectly claiming they still matched due to a bug in the for loop condition. I used the wrong variable and the loop never executed, resulting in equality anytime the two keys being compared were the same length. Use the proper local variable to loop through the arrays, and add a JUnit test to verify equality works as expected. Change-Id: I4a02400e65a9b2e0da925b05a2cc4b579e1dd33a Signed-off-by: Shawn O. Pearce <spearce@spearce.org>stable-0.8
Shawn O. Pearce
15 years ago
2 changed files with 21 additions and 1 deletions
Loading…
Reference in new issue