Fixed bug that caused data corruption in the server responses

This commit is contained in:
tastytea 2018-02-27 05:23:06 +01:00
parent 06c9e2bce2
commit 745debd580
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7)
project (mastodon-cpp
VERSION 0.4.2
VERSION 0.4.3
LANGUAGES CXX
)

View File

@ -188,7 +188,7 @@ const size_t API::http::callback(char* data, size_t size, size_t nmemb,
// This throws the runtime error: Failed writing body
return 0;
}
str->append(data);
str->append(data, size * nmemb);
// ttdebug << "Received " << size * nmemb << " Bytes\n";
return size * nmemb;
};