c++: fix -Wclass-memaccess
authorMichael Wallner <mike@php.net>
Mon, 6 Jan 2020 12:42:52 +0000 (13:42 +0100)
committerMichael Wallner <mike@php.net>
Mon, 6 Jan 2020 12:44:52 +0000 (13:44 +0100)
libtest/http.cc

index 29873dc67f5e959cbe1ab555bd91e7905f9aeb2b..465ce6186708c9d3c5eeb78fb0703343e4d7e056 100644 (file)
@@ -87,7 +87,7 @@ static size_t http_get_result_callback(void *ptr, size_t size, size_t nmemb, voi
   vchar_t *_body= (vchar_t*)data;
 
   _body->resize(size * nmemb);
-  memcpy(&_body[0], ptr, _body->size());
+  memcpy(&(*_body)[0], ptr, _body->size());
 
   return _body->size();
 }