Skip to content

Common - Fix UUID generation#1780

Merged
PabstMirror merged 1 commit intoCBATeam:masterfrom
TheCandianVendingMachine:uuid-fix
Jul 1, 2025
Merged

Common - Fix UUID generation#1780
PabstMirror merged 1 commit intoCBATeam:masterfrom
TheCandianVendingMachine:uuid-fix

Conversation

@TheCandianVendingMachine
Copy link
Copy Markdown
Contributor

When merged this pull request will:

original implementation was off by 1 for a few bits, leading to an invalid UUID. This brings the generation up to spec.

As per the RFC,

UUID=      4hexOctet "-"
           2hexOctet "-"
           2hexOctet "-"
           2hexOctet "-"
           6hexOctet

Current implementation ends up with the format

UUID=      4hexOctet "-"
           2hexOctet "-"
         1.5hexOctet "-"
           2hexOctet "-"
         6.5hexOctet

More simply, output from current generation compared with a fixed example

Old, Fixed:
44f4634c-3376-478-94de-4d1800953c423
44f4634c-3376-478d-94de-4d1800953423

Copy link
Copy Markdown
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PabstMirror PabstMirror merged commit 44dfeb5 into CBATeam:master Jul 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants