Skip to content

GGUUID: Display and parse bytes in their on-disk order#93

Open
rm-NoobInCoding wants to merge 1 commit intoShadelessFox:masterfrom
rm-NoobInCoding:fix/gguuid-byte-order
Open

GGUUID: Display and parse bytes in their on-disk order#93
rm-NoobInCoding wants to merge 1 commit intoShadelessFox:masterfrom
rm-NoobInCoding:fix/gguuid-byte-order

Conversation

@rm-NoobInCoding
Copy link
Copy Markdown

@rm-NoobInCoding rm-NoobInCoding commented Apr 29, 2026

GGUUID is a struct of 16 sequential uint8 fields (Data0..Data15) at offsets 0..15 in the binary file. RTTIUtils.uuidToString was reversing Data0..3, Data4..5 and Data6..7 (Microsoft mixed-endian GUID convention), so the displayed UUID did not match the bytes seen in a hex view of the .core file.

The rest of the codebase already treats this struct as raw bytes — see MurmurHashValueHandler (sequential Data0..Data15) and the GGUUID HashMap-key CRC32C hasher in RTTITypeHashMap (also Data0..Data15 in order).

Reproduction (DS1): a SimpleText whose binary bytes are 36 b1 a4 48 cf 56 40 93 8d f3 88 c3 e7 c4 2f 89 was being displayed as 48a4b136-56cf-9340-8df3-88c3e7c42f89 instead of 36b1a448-cf56-4093-8df3-88c3e7c42f89.

Changes

  • RTTIUtils.uuidToString: emit Data0..Data15 in order.
  • GGUUIDValueEditor.fromString: aligned inverse mapping so a UUID typed into the editor is stored byte-for-byte (Data0 <- first hex pair). randomUUID was already byte-aligned — unchanged.

GGUUID is a struct of 16 sequential uint8 fields (Data0..Data15) stored
in the binary file at offsets 0..15. RTTIUtils.uuidToString reversed
Data0..3, Data4..5 and Data6..7 (Microsoft mixed-endian convention),
so the displayed UUID did not match the bytes seen in a hex view of
the .core file. The MurmurHashValue handler and the GGUUID
HashMap-key CRC32C hasher already treat the same struct as raw bytes.

Emit Data0..Data15 in order, and align GGUUIDValueEditor.fromString so
a UUID typed into the editor is stored byte-for-byte (Data0 <- first
hex pair). Note: existing localization JSON exports and DMF files that
reference UUIDs by string key were written using the old swapped form
and need to be re-exported with this build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant