diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/string.cpp | 6 | ||||
-rw-r--r-- | src/util/string.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/util/string.cpp b/src/util/string.cpp index fb39a24c3..215ac299d 100644 --- a/src/util/string.cpp +++ b/src/util/string.cpp @@ -41,3 +41,9 @@ std::string translatePassword(std::string playername, std::wstring password) return pwd; } +size_t curl_write_data(char *ptr, size_t size, size_t nmemb, void *userdata) { + std::ostringstream *stream = (std::ostringstream*)userdata; + size_t count = size * nmemb; + stream->write(ptr, count); + return count; +} diff --git a/src/util/string.h b/src/util/string.h index 71b11de3d..58274c677 100644 --- a/src/util/string.h +++ b/src/util/string.h @@ -282,6 +282,7 @@ inline std::string wrap_rows(const std::string &from, u32 rowlen) } std::string translatePassword(std::string playername, std::wstring password); +size_t curl_write_data(char *ptr, size_t size, size_t nmemb, void *userdata); #endif |