Permalink
Browse files

change memcpy to memmove (#391)

  • Loading branch information...
zywww authored and xicilion committed Dec 27, 2017
1 parent 5b69485 commit 5b071a39871b7fd607cdb720d0330e6032f9db2d
Showing with 1 addition and 1 deletion.
  1. +1 −1 fibjs/src/global/Buffer.cpp
@@ -572,7 +572,7 @@ result_t Buffer::copy(Buffer_base* targetBuffer, int32_t targetStart, int32_t so
int32_t sourceLen = sourceEnd - sourceStart;
int32_t sz = MIN(MIN(sourceLen, targetSz), sourceSz);
memcpy(&buf->m_data[targetStart], m_data.c_str() + sourceStart, sz);
memmove(&buf->m_data[targetStart], m_data.c_str() + sourceStart, sz);
retVal = sz;

0 comments on commit 5b071a3

Please sign in to comment.