summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_http.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Weather/src/weather_http.cpp')
-rw-r--r--plugins/Weather/src/weather_http.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Weather/src/weather_http.cpp b/plugins/Weather/src/weather_http.cpp
index 1209648d64..63ea78b03a 100644
--- a/plugins/Weather/src/weather_http.cpp
+++ b/plugins/Weather/src/weather_http.cpp
@@ -136,9 +136,9 @@ int InternetDownloadFile(char *szUrl, char *cookie, char *userAgent, wchar_t **s
}
// return error code if the recieved code is neither 200 OK nor 302 Moved
else {
- *szData = (wchar_t*)mir_alloc(512);
// store the error code in szData
- mir_snwprintf(*szData, 512, L"Error occured! HTTP Error: %i\n", nlhrReply->resultCode);
+ CMStringW wszError(FORMAT, L"Error occured! HTTP Error: %i\n", nlhrReply->resultCode);
+ *szData = wszError.Detach();
result = nlhrReply->resultCode;
}