Denote invalid GUIDs in data inspector

Addresses #24
This commit is contained in:
WerWolv 2020-12-05 11:00:56 +01:00
parent 2ca9a8fc79
commit 168ba2ff9f
1 changed files with 2 additions and 1 deletions

View File

@ -96,7 +96,8 @@ namespace hex {
} }
#endif #endif
this->m_cachedData.emplace_back("GUID", hex::format("{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}", this->m_cachedData.emplace_back("GUID", hex::format("%s{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}",
(this->m_previewData.guid.data3 >> 12) <= 5 && ((this->m_previewData.guid.data4[0] >> 4) >= 8 || (this->m_previewData.guid.data4[0] >> 4) == 0) ? "" : "[INVALID] ",
hex::changeEndianess(this->m_previewData.guid.data1, this->m_endianess), hex::changeEndianess(this->m_previewData.guid.data1, this->m_endianess),
hex::changeEndianess(this->m_previewData.guid.data2, this->m_endianess), hex::changeEndianess(this->m_previewData.guid.data2, this->m_endianess),
hex::changeEndianess(this->m_previewData.guid.data3, this->m_endianess), hex::changeEndianess(this->m_previewData.guid.data3, this->m_endianess),