Skip to content

Commit

Permalink
fix: fixed code scanning alerts (#49)
Browse files Browse the repository at this point in the history
Fix code scanning alert - Comparison of narrow type with wide type in loop condition #42
  • Loading branch information
pbezliapovich authored May 24, 2024
1 parent 4bd11ce commit b67357b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/outerj/daisy/diff/html/HTMLDiffer.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ private List<RangeDifference> preProcess(RangeDifference[] differences) {

while (i + 1 < differences.length
&& differences[i + 1].kind() == kind
&& score(leftLength, differences[i + 1].leftLength(),
rightLength, differences[i + 1].rightLength()) > (differences[i + 1]
&& ((int) score(leftLength, differences[i + 1].leftLength(),
rightLength, differences[i + 1].rightLength())) > (differences[i + 1]
.leftStart() - leftEnd)) {
leftEnd = differences[i + 1].leftEnd();
rightEnd = differences[i + 1].rightEnd();
Expand Down

0 comments on commit b67357b

Please sign in to comment.