shithub: choc

Download patch

ref: 8914be2c2876fbec6b9d73bc2bfb1092488b3081
parent: 55a7efa90416c78bf95e5d552b05e4b6303e0e8f
author: James Haley <[email protected]>
date: Tue Jun 14 16:34:15 EDT 2016

Fix issue #623: PCX reserved byte should be 0

--- a/src/v_video.c
+++ b/src/v_video.c
@@ -672,6 +672,7 @@
     pcx->hres = SHORT(width);
     pcx->vres = SHORT(height);
     memset (pcx->palette,0,sizeof(pcx->palette));
+    pcx->reserved = 0;                  // PCX spec: reserved byte must be zero
     pcx->color_planes = 1;		// chunky image
     pcx->bytes_per_line = SHORT(width);
     pcx->palette_type = SHORT(2);	// not a grey scale