Skip to content
Snippets Groups Projects
Commit dd63f5cf authored by Shawn Pearce's avatar Shawn Pearce
Browse files

Fix FooterLine.matches(FooterKey) on same length keys


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: default avatarShawn O. Pearce <spearce@spearce.org>
parent d011a377
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment