From 894ba560fe80e08892f0bc636697fcedd3193032 Mon Sep 17 00:00:00 2001 From: Peter Bwire Date: Sun, 13 Nov 2022 13:09:54 +0300 Subject: [PATCH] fix bug in machine id gen as less bytes are generated when less than 10k --- lib/src/xid_base.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/xid_base.dart b/lib/src/xid_base.dart index b2c8270..e7f427d 100644 --- a/lib/src/xid_base.dart +++ b/lib/src/xid_base.dart @@ -82,7 +82,7 @@ class Xid { } _processId = Random.secure().nextInt(4194304); - _machineId = Random.secure().nextInt(5170000).toString(); + _machineId = (12307 + Random.secure().nextInt(5170000)).toString(); return _toBytes(_machineId!); }