File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ func (i *ID) Generate() int64 {
87
87
func (i * ID ) getDelta () uint32 {
88
88
if i .randomDelta > 0 {
89
89
if de , err := rand .Int (rand .Reader , big .NewInt (int64 (i .randomDelta ))); err == nil {
90
- return uint32 (de .Int64 ())
90
+ return uint32 (de .Int64 () + 1 )
91
91
}
92
92
}
93
93
return i .delta
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ func (i *ID2) Generate() int64 {
87
87
func (i * ID2 ) getDelta () uint32 {
88
88
if i .randomDelta > 0 {
89
89
if de , err := rand .Int (rand .Reader , big .NewInt (int64 (i .randomDelta ))); err == nil {
90
- return uint32 (de .Int64 ())
90
+ return uint32 (de .Int64 () + 1 )
91
91
}
92
92
}
93
93
return i .delta
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ func (i *ID3) Generate() int64 {
71
71
func (i * ID3 ) getDelta () uint16 {
72
72
if i .randomDelta > 0 {
73
73
if de , err := rand .Int (rand .Reader , big .NewInt (int64 (i .randomDelta ))); err == nil {
74
- return uint16 (de .Int64 ())
74
+ return uint16 (de .Int64 () + 1 )
75
75
}
76
76
}
77
77
return i .delta
You can’t perform that action at this time.
0 commit comments