diff options
author | René Meusel <[email protected]> | 2018-01-05 15:10:50 +0100 |
---|---|---|
committer | René Meusel <[email protected]> | 2018-01-05 15:11:18 +0100 |
commit | 630c232a30fedfd23c7710407d5110eadf12b697 (patch) | |
tree | 507aec0eca14a2ce86fd2ee238210860c105e4ef /src/lib/stream/ctr | |
parent | 833ba4128a72649e81c4aa830a3c2b5adcb902ac (diff) |
FIX: add carry bit to correct half-pad
Diffstat (limited to 'src/lib/stream/ctr')
-rw-r--r-- | src/lib/stream/ctr/ctr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/stream/ctr/ctr.cpp b/src/lib/stream/ctr/ctr.cpp index 21e62fb4b..c63bdebdc 100644 --- a/src/lib/stream/ctr/ctr.cpp +++ b/src/lib/stream/ctr/ctr.cpp @@ -148,7 +148,7 @@ void CTR_BE::add_counter(const uint64_t counter) uint64_t b0 = load_be<uint64_t>(&m_counter[off], 0); uint64_t b1 = load_be<uint64_t>(&m_counter[off], 1); b1 += counter; - b1 += (b1 < counter) ? 1 : 0; // carry + b0 += (b1 < counter) ? 1 : 0; // carry store_be(b0, &m_counter[off]); store_be(b1, &m_counter[off+8]); off += BS; |