foxygit / doom Log in
commit 8914be2c2876fbec6b9d73bc2bfb1092488b3081
Author:     James Haley <haleyjd@hotmail.com>
AuthorDate: Tue Jun 14 20:34:15 2016 -0500
Commit:     James Haley <haleyjd@hotmail.com>
CommitDate: Tue Jun 14 20:34:15 2016 -0500

    Fix issue #623: PCX reserved byte should be 0
---
 src/v_video.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/v_video.c b/src/v_video.c
index 3789de38..40d7df1c 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -672,6 +672,7 @@ void WritePCXfile(char *filename, byte *data,
     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