summaryrefslogtreecommitdiff
path: root/plugins/Twitter/http.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Twitter/http.cpp')
-rw-r--r--plugins/Twitter/http.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Twitter/http.cpp b/plugins/Twitter/http.cpp
index aaf9210ac4..63218ca616 100644
--- a/plugins/Twitter/http.cpp
+++ b/plugins/Twitter/http.cpp
@@ -29,7 +29,9 @@ std::string http::url_encode(const std::string &s)
std::string http::url_encode(const std::wstring &s)
{
- char *encoded = (char*)CallService( MS_NETLIB_URLENCODE, 0, ( LPARAM )( char* )_T2A(s.c_str()));
+ char* data = mir_u2a( s.c_str());
+ char *encoded = (char*)CallService( MS_NETLIB_URLENCODE, 0, ( LPARAM )data);
+ mir_free( data );
std::string ret = encoded;
HeapFree(GetProcessHeap(),0,encoded);