GGUUID: Display and parse bytes in their on-disk order#93
Open
rm-NoobInCoding wants to merge 1 commit intoShadelessFox:masterfrom
Open
GGUUID: Display and parse bytes in their on-disk order#93rm-NoobInCoding wants to merge 1 commit intoShadelessFox:masterfrom
rm-NoobInCoding wants to merge 1 commit intoShadelessFox:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GGUUIDis a struct of 16 sequentialuint8fields (Data0..Data15) at offsets 0..15 in the binary file.RTTIUtils.uuidToStringwas reversingData0..3,Data4..5andData6..7(Microsoft mixed-endian GUID convention), so the displayed UUID did not match the bytes seen in a hex view of the.corefile.The rest of the codebase already treats this struct as raw bytes — see
MurmurHashValueHandler(sequentialData0..Data15) and theGGUUIDHashMap-keyCRC32Chasher inRTTITypeHashMap(alsoData0..Data15in order).Reproduction (DS1): a SimpleText whose binary bytes are
36 b1 a4 48 cf 56 40 93 8d f3 88 c3 e7 c4 2f 89was being displayed as48a4b136-56cf-9340-8df3-88c3e7c42f89instead of36b1a448-cf56-4093-8df3-88c3e7c42f89.Changes
RTTIUtils.uuidToString: emitData0..Data15in order.GGUUIDValueEditor.fromString: aligned inverse mapping so a UUID typed into the editor is stored byte-for-byte (Data0<- first hex pair).randomUUIDwas already byte-aligned — unchanged.