From 81c36341ef78749b316e84658c51fe545d3a6e70 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 22 Aug 2021 18:23:41 -0700 Subject: [PATCH] Fully initialize XImage ScreenBitmap with XInitImage() before using it. --- src/xinit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xinit.c b/src/xinit.c index 265ff72..938935e 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -324,9 +324,11 @@ DspInterface X_init(DspInterface dsp, char *lispbitmap, int width_hint, int heig dsp->ScreenBitmap.bitmap_bit_order = MSBFirst; dsp->ScreenBitmap.bitmap_pad = 32; dsp->ScreenBitmap.depth = 1; + dsp->ScreenBitmap.bits_per_pixel = 1; dsp->ScreenBitmap.bytes_per_line = ((dsp->Display.width + (BITSPER_DLWORD - 1)) / BITSPER_DLWORD) * (BITSPER_DLWORD / 8); break; } + XInitImage(&dsp->ScreenBitmap); return (dsp); }