MCPcopy Create free account
hub / github.com/ZDoom/Raze / FinishChunk

Function FinishChunk

source/core/d_protocol.cpp:411–424  ·  view source on GitHub ↗

Write the length field for the chunk and insert pad byte if the chunk is odd-sized.

Source from the content-addressed store, hash-verified

409// Write the length field for the chunk and insert
410// pad byte if the chunk is odd-sized.
411void FinishChunk (uint8_t **stream)
412{
413 int len;
414
415 if (!lenspot)
416 return;
417
418 len = int(*stream - lenspot - 4);
419 WriteLong (len, &lenspot);
420 if (len & 1)
421 WriteByte (0, stream);
422
423 lenspot = NULL;
424}
425
426// Skip past an unknown chunk. *stream should be
427// pointing to the chunk's length field.

Callers

nothing calls this directly

Calls 2

WriteLongFunction · 0.85
WriteByteFunction · 0.85

Tested by

no test coverage detected