From 318b0e20fa1edd2dc700a01e47d31ebb8c219460 Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 15 May 2014 02:06:35 +0000 Subject: Visual C++'s iterator debugging gets cranky with &vec[vec.size()]. Github #21 --- src/lib/algo_base/symkey.h | 2 +- src/lib/filters/buf_filt.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/algo_base/symkey.h b/src/lib/algo_base/symkey.h index b47da8a69..a93f456bb 100644 --- a/src/lib/algo_base/symkey.h +++ b/src/lib/algo_base/symkey.h @@ -37,7 +37,7 @@ class BOTAN_DLL OctetString /** * @return end of this string */ - const byte* end() const { return &bits[bits.size()]; } + const byte* end() const { return begin() + bits.size(); } /** * @return this encoded as hex diff --git a/src/lib/filters/buf_filt.cpp b/src/lib/filters/buf_filt.cpp index ca3fa9a3c..60e51b02a 100644 --- a/src/lib/filters/buf_filt.cpp +++ b/src/lib/filters/buf_filt.cpp @@ -55,7 +55,7 @@ void Buffered_Filter::write(const byte input[], size_t input_size) buffer_pos -= total_to_consume; - copy_mem(&buffer[0], &buffer[total_to_consume], buffer_pos); + copy_mem(&buffer[0], &buffer[0] + total_to_consume, buffer_pos); } if(input_size >= final_minimum) -- cgit v1.2.3