mirror of https://github.com/OpenTTD/OpenTTD
(svn r18996) -Fix (r18993, r18994): MSVC 64 bits had somethings to complain about
parent
a61cd5ad85
commit
d818c7c7b1
|
@ -79,9 +79,9 @@ public:
|
||||||
* @param to_add the number of items to append
|
* @param to_add the number of items to append
|
||||||
* @return pointer to newly allocated item
|
* @return pointer to newly allocated item
|
||||||
*/
|
*/
|
||||||
FORCEINLINE T *Append(size_t to_add = 1)
|
FORCEINLINE T *Append(uint to_add = 1)
|
||||||
{
|
{
|
||||||
size_t begin = this->items;
|
uint begin = this->items;
|
||||||
this->items += to_add;
|
this->items += to_add;
|
||||||
|
|
||||||
if (this->items > this->capacity) {
|
if (this->items > this->capacity) {
|
||||||
|
|
|
@ -35,7 +35,7 @@ NetworkHTTPSocketHandler::NetworkHTTPSocketHandler(SOCKET s,
|
||||||
redirect_depth(depth),
|
redirect_depth(depth),
|
||||||
sock(s)
|
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);
|
char *buffer = AllocaM(char, bufferSize);
|
||||||
|
|
||||||
DEBUG(net, 7, "[tcp/http] requesting %s%s", host, url);
|
DEBUG(net, 7, "[tcp/http] requesting %s%s", host, url);
|
||||||
|
|
|
@ -511,7 +511,7 @@ void ClientNetworkContentSocketHandler::OnReceiveData(const char *data, size_t l
|
||||||
if (this->http_response_index == -1) {
|
if (this->http_response_index == -1) {
|
||||||
if (data != NULL) {
|
if (data != NULL) {
|
||||||
/* Append the rest of the response. */
|
/* Append the rest of the response. */
|
||||||
memcpy(this->http_response.Append(length), data, length);
|
memcpy(this->http_response.Append((uint)length), data, length);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
/* Make sure the response is properly terminated. */
|
/* Make sure the response is properly terminated. */
|
||||||
|
@ -563,7 +563,7 @@ void ClientNetworkContentSocketHandler::OnReceiveData(const char *data, size_t l
|
||||||
check_and_terminate(p);
|
check_and_terminate(p);
|
||||||
|
|
||||||
/* Update the index for the next one */
|
/* 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 */
|
/* Read the ID */
|
||||||
p = strchr(str, ',');
|
p = strchr(str, ',');
|
||||||
|
|
Loading…
Reference in New Issue