ref: ab547d8e97c1bbedfff2fe7d5ff18fc3171abc6d
parent: 595b27669a83cdbd84bfdc13d581ae8fd8c6e0be
author: qwx <qwx@sciops.net>
date: Fri Mar 6 05:38:44 EST 2026
sdl3: fix now uninitialized surface format pointer
--- a/libnpe_sdl3/surface.c
+++ b/libnpe_sdl3/surface.c
@@ -65,6 +65,9 @@
werrstr("SDL_CreateRGBSurface: memory");return nil;
}
+ s->format = calloc(1, sizeof(SDL_PixelFormat));
+ s->format->BytesPerPixel = bpp/8;
+ s->format->format = chan2pixel(chan);
if(chan == CMAP8){s->i = allocmemimage(Rect(0,0,w,h), screen->chan);
s->format->palette = calloc(1, sizeof(SDL_Palette));
--
⑨