Skip to content

Commit 88c28b1

Browse files
committed
Fix gcc(?) issue
1 parent fe432fe commit 88c28b1

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Diff for: src/PE/debug/CodeViewPDB.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,18 @@ std::string CodeViewPDB::guid() const {
4949
if (!stream) {
5050
return "";
5151
}
52+
5253
stream->set_endian_swap(true);
53-
return fmt::format("{:08x}-{:04x}-{:04x}-{:04x}-{:04x}{:08x}",
54-
stream->read<uint32_t>().value_or(0),
55-
stream->read<uint16_t>().value_or(0),
56-
stream->read<uint16_t>().value_or(0),
57-
stream->read_conv<uint16_t>().value_or(0),
58-
stream->read_conv<uint16_t>().value_or(0),
59-
stream->read_conv<uint32_t>().value_or(0)
54+
55+
const auto chunk1 = stream->read<uint32_t>().value_or(0);
56+
const auto chunk2 = stream->read<uint16_t>().value_or(0);
57+
const auto chunk3 = stream->read<uint16_t>().value_or(0);
58+
const auto chunk4 = stream->read_conv<uint16_t>().value_or(0);
59+
const auto chunk5 = stream->read_conv<uint16_t>().value_or(0);
60+
const auto chunk6 = stream->read_conv<uint32_t>().value_or(0);
61+
62+
return fmt::format("{:08x}-{:04x}-{:04x}-{:04x}-{:04x}{:08x}",
63+
chunk1, chunk2, chunk3, chunk4, chunk5, chunk6
6064
);
6165
}
6266

0 commit comments

Comments
 (0)