Skip to content

Commit

Permalink
update to Boost 1.86.0
Browse files Browse the repository at this point in the history
fixes #2378
  • Loading branch information
dbear496 committed Sep 13, 2024
1 parent 6d61583 commit ad93c18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/filters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void anonymize_posts::render_commodity(amount_t& amt)
void anonymize_posts::operator()(post_t& post)
{
boost::uuids::detail::sha1 sha;
unsigned int message_digest[5];
unsigned char message_digest[20];
bool copy_xact_details = false;

if (last_xact != post.xact) {
Expand Down Expand Up @@ -1269,7 +1269,7 @@ void budget_posts::report_budget_items(const date_t& date)
foreach (pending_posts_list::iterator& i, posts_to_erase)
pending_posts.erase(i);
}

if (pending_posts.size() == 0)
return;

Expand Down
12 changes: 6 additions & 6 deletions src/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,14 @@ inline int peek_next_nonws(std::istream& in) {
*_p = '\0'; \
}

inline string to_hex(unsigned int * message_digest, const int len = 1)
inline string to_hex(unsigned char * message_digest, const int len = 4)
{
std::ostringstream buf;

for(int i = 0; i < 5 ; i++) {
buf.width(8);
for(int i = 0; i < 20 ; i++) {
buf.width(2);
buf.fill('0');
buf << std::hex << message_digest[i];
buf << std::hex << (int)message_digest[i];
if (i + 1 >= len)
break; // only output the first LEN dwords
}
Expand All @@ -598,9 +598,9 @@ inline string sha1sum(const string& str)

sha.process_bytes(str.c_str(), str.length());

unsigned int message_digest[5];
unsigned char message_digest[20];
sha.get_digest(message_digest);
return to_hex(message_digest, 5);
return to_hex(message_digest, 20);
}

extern const string version;
Expand Down

0 comments on commit ad93c18

Please sign in to comment.