Closed Trass3r closed 4 years ago
diff --git a/src_pdbgen/guidhelper.h b/src_pdbgen/guidhelper.h index 8faffb1..cdb9327 100644 --- a/src_pdbgen/guidhelper.h +++ b/src_pdbgen/guidhelper.h @@ -6,19 +6,19 @@ #include <sstream> #include <vector> -static struct GUID { +struct GUID { unsigned long Data1; unsigned short Data2; unsigned short Data3; unsigned char Data4[8]; }; -std::string guidToHex(std::vector<uint8_t>& vec) +std::string guidToHex(const std::vector<uint8_t>& vec) { std::ostringstream oss; oss << std::hex << std::uppercase; - auto* guid = reinterpret_cast<GUID*>(vec.data()); + auto* guid = reinterpret_cast<const GUID*>(vec.data()); oss << std::setw(2) << std::setfill('0') << guid->Data1; oss << std::setw(2) << std::setfill('0') << guid->Data2; oss << std::setw(2) << std::setfill('0') << guid->Data3; diff --git a/src_pdbgen/pdbcreator.cpp b/src_pdbgen/pdbcreator.cpp index 84807ab..b81b3af 100644 --- a/src_pdbgen/pdbcreator.cpp +++ b/src_pdbgen/pdbcreator.cpp @@ -104,7 +104,8 @@ void PdbCreator::ImportIDA(IdaDb& ida_db) bool PdbCreator::Commit(std::filesystem::path& path) { std::filesystem::create_directories(path.parent_path()); - if (_pdbBuilder.commit(path.string(), &_pdbBuilder.getInfoBuilder().getGuid())) { + auto guid = _pdbBuilder.getInfoBuilder().getGuid(); + if (_pdbBuilder.commit(path.string(), &guid)) { return false; }
fixed in #9 / 22c3d691e5510a1a2720b41103a6b5c6b98a7fe2