Merge pull request #9226 from Zwelf/pr-fix-saveload-teehistorian-chunk

Fix incomplete Teehistorian chunks being written
This commit is contained in:
Dennis Felsing 2024-11-09 22:31:14 +00:00 committed by GitHub
commit 958926348e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ class CPacker
public: public:
enum enum
{ {
PACKER_BUFFER_SIZE = 1024 * 2 PACKER_BUFFER_SIZE = 1024 * 64
}; };
private: private:

View file

@ -10,7 +10,7 @@
static const char TEEHISTORIAN_NAME[] = "teehistorian@ddnet.tw"; static const char TEEHISTORIAN_NAME[] = "teehistorian@ddnet.tw";
static const CUuid TEEHISTORIAN_UUID = CalculateUuid(TEEHISTORIAN_NAME); static const CUuid TEEHISTORIAN_UUID = CalculateUuid(TEEHISTORIAN_NAME);
static const char TEEHISTORIAN_VERSION[] = "2"; static const char TEEHISTORIAN_VERSION[] = "2";
static const char TEEHISTORIAN_VERSION_MINOR[] = "8"; static const char TEEHISTORIAN_VERSION_MINOR[] = "9";
#define UUID(id, name) static const CUuid UUID_##id = CalculateUuid(name); #define UUID(id, name) static const CUuid UUID_##id = CalculateUuid(name);
#include <engine/shared/teehistorian_ex_chunks.h> #include <engine/shared/teehistorian_ex_chunks.h>

View file

@ -105,7 +105,7 @@ protected:
void Expect(const unsigned char *pOutput, size_t OutputSize) void Expect(const unsigned char *pOutput, size_t OutputSize)
{ {
static CUuid TEEHISTORIAN_UUID = CalculateUuid("teehistorian@ddnet.tw"); static CUuid TEEHISTORIAN_UUID = CalculateUuid("teehistorian@ddnet.tw");
static const char PREFIX1[] = "{\"comment\":\"teehistorian@ddnet.tw\",\"version\":\"2\",\"version_minor\":\"8\",\"game_uuid\":\"a1eb7182-796e-3b3e-941d-38ca71b2a4a8\",\"server_version\":\"DDNet test\",\"start_time\":\""; static const char PREFIX1[] = "{\"comment\":\"teehistorian@ddnet.tw\",\"version\":\"2\",\"version_minor\":\"9\",\"game_uuid\":\"a1eb7182-796e-3b3e-941d-38ca71b2a4a8\",\"server_version\":\"DDNet test\",\"start_time\":\"";
static const char PREFIX2[] = "\",\"server_name\":\"server name\",\"server_port\":\"8303\",\"game_type\":\"game type\",\"map_name\":\"Kobra 3 Solo\",\"map_size\":\"903514\",\"map_sha256\":\"0123456789012345678901234567890123456789012345678901234567890123\",\"map_crc\":\"eceaf25c\",\"prng_description\":\"test-prng:02468ace\",\"config\":{},\"tuning\":{},\"uuids\":["; static const char PREFIX2[] = "\",\"server_name\":\"server name\",\"server_port\":\"8303\",\"game_type\":\"game type\",\"map_name\":\"Kobra 3 Solo\",\"map_size\":\"903514\",\"map_sha256\":\"0123456789012345678901234567890123456789012345678901234567890123\",\"map_crc\":\"eceaf25c\",\"prng_description\":\"test-prng:02468ace\",\"config\":{},\"tuning\":{},\"uuids\":[";
static const char PREFIX3[] = "]}"; static const char PREFIX3[] = "]}";