修正回环时计算前后包距错误

This commit is contained in:
ljx0305 2023-12-07 10:18:17 +08:00 committed by GitHub
parent 8682a655d7
commit 74b964dd59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -102,7 +102,7 @@ private:
ret = next_seq - seq; ret = next_seq - seq;
} }
if (ret > SEQ_MAX >> 1) { if (ret > SEQ_MAX >> 1) {
return SEQ_MAX - ret; return SEQ_MAX - ret + 1;
} }
return ret; return ret;
} }