Browse Source

use memmove instead of memcpy

master
Martin Dørum 3 years ago
parent
commit
d6781bbad7
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/bufio.h

+ 1
- 1
src/bufio.h View File

@@ -153,7 +153,7 @@ inline int IBuf<bufsiz>::peek(size_t count) {
return buf_[idx_ + offset];
} else {
len_ -= idx_;
memcpy(buf_, buf_ + idx_, len_);
memmove(buf_, buf_ + idx_, len_);
idx_ = 0;
len_ += is_.read(buf_ + len_, sizeof(buf_) - len_);
if (len_ <= offset) {

Loading…
Cancel
Save