mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-01 14:35:29 +00:00
[2369] Fix vector::erase() call in InputSource
The single-argument variant of vector::erase() deletes just one element of the vector, not an entire range. Tests have been fixed to check that the range from start to the current buffer position is dropped correctly.
This commit is contained in:
@@ -107,7 +107,7 @@ InputSource::compact() {
|
||||
if (buffer_pos_ == buffer_.size()) {
|
||||
buffer_.clear();
|
||||
} else {
|
||||
buffer_.erase(buffer_.begin() + buffer_pos_);
|
||||
buffer_.erase(buffer_.begin(), buffer_.begin() + buffer_pos_);
|
||||
}
|
||||
|
||||
buffer_pos_ = 0;
|
||||
|
Reference in New Issue
Block a user