Fix memcpy buf=NULL/len=0 issue in replace_part(). (closes #3790)
Calling memcpy with src or dest=NULL is technically illegal, even if len=0. Recent compilers seem to now be generating warnings/errors with this. replace_part() is currently the only place we are getting bug reports, so for now just fix the problem in this one place.
Showing with 18 additions and 10 deletions