提交 617459ae 编写于 作者: yitter's avatar yitter

auto commit

上级 7bbc8a15
......@@ -106,7 +106,7 @@ namespace Yitter.IdGenerator
}
// 5.MaxSeqNumber
if (MaxSeqNumber == 0)
if (options.MaxSeqNumber <= 0)
{
MaxSeqNumber = (1 << SeqBitLength) - 1;
}
......
......@@ -156,7 +156,7 @@ begin
end;
// 5.MaxSeqNumber
if (MaxSeqNumber = 0) then
if (options.MaxSeqNumber <= 0) then
begin
FMaxSeqNumber := (1 shl SeqBitLength) - 1;
end
......
......@@ -93,7 +93,7 @@ impl SnowWorkerM1 {
// 5.MaxSeqNumber
let mut maxSeqNumber = (1 << options.SeqBitLength) - 1;
if maxSeqNumber == 0 {
if options.maxSeqNumber <= 0 {
maxSeqNumber = 63;
}
if options.MaxSeqNumber < 0 || options.MaxSeqNumber > maxSeqNumber {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册