Skip to content

Commit

Permalink
Prepend 0s to buildid if missing (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBrumbler authored Mar 22, 2024
1 parent 1903cd9 commit 722c4e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,8 @@ std::optional<std::string> getBuildId(std::string_view filename) {
ptr[3] = *(buildIdAddr + i * sizeof(uint32_t));
stream << value;
}
return stream.str();
auto buildid = stream.str();
return std::string(std::clamp<int>(40 - buildid.size(), 0, 40), '0') + buildid;
}
}
}
Expand Down

0 comments on commit 722c4e4

Please sign in to comment.