1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

CI: Sync configuration with 4.4 branch

Includes cherry-picks of warning fixes from 8d1462c748
and template builds unit tests fixes from 17929a3443
and 832695eb2c.
This commit is contained in:
Rémi Verschelde
2025-04-24 18:14:03 +02:00
parent a175d81064
commit 0841c7af0b
34 changed files with 395 additions and 278 deletions

View File

@@ -662,15 +662,16 @@ PackedByteArray HTTPClientTCP::read_response_body_chunk() {
chunk_left -= rec;
if (chunk_left == 0) {
if (chunk[chunk.size() - 2] != '\r' || chunk[chunk.size() - 1] != '\n') {
const int chunk_size = chunk.size();
if (chunk[chunk_size - 2] != '\r' || chunk[chunk_size - 1] != '\n') {
ERR_PRINT("HTTP Invalid chunk terminator (not \\r\\n)");
status = STATUS_CONNECTION_ERROR;
break;
}
ret.resize(chunk.size() - 2);
ret.resize(chunk_size - 2);
uint8_t *w = ret.ptrw();
memcpy(w, chunk.ptr(), chunk.size() - 2);
memcpy(w, chunk.ptr(), chunk_size - 2);
chunk.clear();
}