Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Nov 4, 2022
2 parents d136633 + 1c0040b commit c671aa2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/chaos/unity/nenggao/Span.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ public boolean isIn(int line) {
* @return offset of two position.
*/
public int offset() {
if (startPosition.pos > endPosition.pos) {
return -1;
} else if (startPosition.line != endPosition.line) {
if (startPosition.line != endPosition.line || startPosition.pos > endPosition.pos) {
return -1;
}
return endPosition.pos - startPosition.pos;
Expand Down

0 comments on commit c671aa2

Please sign in to comment.