diff --git a/include/olm/list.hh b/include/olm/list.hh index 6906c87..5bdaca3 100644 --- a/include/olm/list.hh +++ b/include/olm/list.hh @@ -99,9 +99,9 @@ public: return *this; } T * this_pos = _data; - T * const other_pos = other._data; + const T * other_pos = other._data; while (other_pos != other._end) { - *this_pos = *other; + *this_pos = *other_pos; ++this_pos; ++other_pos; } diff --git a/src/session.cpp b/src/session.cpp index 6cc73e3..d66ccc0 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -437,7 +437,7 @@ void olm::Session::describe(char *describe_buffer, size_t buflen) { size = snprintf( describe_buffer, remaining, - "sender chain index: %d ", ratchet.sender_chain[0].chain_key.index + "sender chain index: %lu ", ratchet.sender_chain[0].chain_key.index ); CHECK_SIZE_AND_ADVANCE; @@ -447,7 +447,7 @@ void olm::Session::describe(char *describe_buffer, size_t buflen) { for (size_t i = 0; i < ratchet.receiver_chains.size(); ++i) { size = snprintf( describe_buffer, remaining, - " %d", ratchet.receiver_chains[i].chain_key.index + " %lu", ratchet.receiver_chains[i].chain_key.index ); CHECK_SIZE_AND_ADVANCE; } @@ -458,7 +458,7 @@ void olm::Session::describe(char *describe_buffer, size_t buflen) { for (size_t i = 0; i < ratchet.skipped_message_keys.size(); ++i) { size = snprintf( describe_buffer, remaining, - " %d", ratchet.skipped_message_keys[i].message_key.index + " %lu", ratchet.skipped_message_keys[i].message_key.index ); CHECK_SIZE_AND_ADVANCE; }