修正回环时计算前后包距错误 (#3089)

This commit is contained in:
ljx0305 2023-12-07 22:05:42 +08:00 committed by GitHub
parent d21bdc35c9
commit 44c82752b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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