summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/tcp_http.cpp2
-rw-r--r--src/network/network_content.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/network/core/tcp_http.cpp b/src/network/core/tcp_http.cpp
index 32c04535b..afba28fce 100644
--- a/src/network/core/tcp_http.cpp
+++ b/src/network/core/tcp_http.cpp
@@ -35,7 +35,7 @@ NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(SOCKET s,
redirect_depth(depth),
sock(s)
{
- int bufferSize = strlen(url) + strlen(host) + strlen(_openttd_revision) + (data == NULL ? 0 : strlen(data)) + 128;
+ size_t bufferSize = strlen(url) + strlen(host) + strlen(_openttd_revision) + (data == NULL ? 0 : strlen(data)) + 128;
char *buffer = AllocaM(char, bufferSize);
DEBUG(net, 7, "[tcp/http] requesting %s%s", host, url);
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index ed61fce19..1ffa2669f 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -511,7 +511,7 @@ void ClientNetworkContentSocketHandler::OnReceiveData(const char *data, size_t l
if (this->http_response_index == -1) {
if (data != NULL) {
/* Append the rest of the response. */
- memcpy(this->http_response.Append(length), data, length);
+ memcpy(this->http_response.Append((uint)length), data, length);
return;
} else {
/* Make sure the response is properly terminated. */
@@ -563,7 +563,7 @@ void ClientNetworkContentSocketHandler::OnReceiveData(const char *data, size_t l
check_and_terminate(p);
/* Update the index for the next one */
- this->http_response_index += strlen(str) + 1;
+ this->http_response_index += (int)strlen(str) + 1;
/* Read the ID */
p = strchr(str, ',');