Explorar el Código

use memmove instead of memcpy

master
Martin Dørum hace 3 años
padre
commit
d6781bbad7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      src/bufio.h

+ 1
- 1
src/bufio.h Ver fichero

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

Cargando…
Cancelar
Guardar