Skip to content

Commit

Permalink
Fix buffer slicing on UUID generation
Browse files Browse the repository at this point in the history
  • Loading branch information
firenero committed Aug 8, 2024
1 parent 02c6269 commit d59e434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FastIDs.TypeId/TypeId.Core/Uuid/UuidGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public Guid New()
SetTimestamp(buffer[..8], timestamp); // Using full buffer because we need to account for two zero-bytes in front.
RandomNumberGenerator.Fill(idBytes[8..]);

return GuidConverter.CreateGuidFromBigEndianBytes(buffer);
return GuidConverter.CreateGuidFromBigEndianBytes(buffer[2..]);
}

// The implementation copied from DateTimeOffset.ToUnixTimeMilliseconds()
Expand Down

0 comments on commit d59e434

Please sign in to comment.