Skip to content

Commit 894ba56

Browse files
committed
fix bug in machine id gen as less bytes are generated when less than 10k
1 parent 98af075 commit 894ba56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/xid_base.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class Xid {
8282
}
8383

8484
_processId = Random.secure().nextInt(4194304);
85-
_machineId = Random.secure().nextInt(5170000).toString();
85+
_machineId = (12307 + Random.secure().nextInt(5170000)).toString();
8686
return _toBytes(_machineId!);
8787
}
8888

0 commit comments

Comments
 (0)