Bläddra i källkod

use memmove instead of memcpy

master
Martin Dørum 3 år sedan
förälder
incheckning
d6781bbad7
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      src/bufio.h

+ 1
- 1
src/bufio.h Visa fil

@@ -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) {

Laddar…
Avbryt
Spara