Fixing decodecorpus test issue

This commit is contained in:
Vivek Miglani 2019-07-18 14:32:09 -07:00
parent c7be7d2efb
commit a3ce0c9d04

View File

@ -1050,8 +1050,8 @@ static void writeBlock(U32* seed, frame_t* frame, size_t contentSize,
op += contentSize;
blockType = 0;
blockSize = contentSize;
} else if (blockTypeDesc == 1) {
/* RLE */
} else if (blockTypeDesc == 1 && frame->header.contentSize > 0) {
/* RLE (Don't create RLE block if frame content is 0 since block size of 1 may exceed max block size)*/
BYTE const symbol = RAND(seed) & 0xff;
op[0] = symbol;