shithub: qk1

Download patch

ref: 57bae65b26afd0c01b4c65b3d7538cc96ef80ae8
parent: 54dfc8929a5f41d0fc78e9a25b50ebf5748f0496
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Wed Feb 7 20:48:06 EST 2024

TGA_Encode: fix a warning reported by scan-build

--- a/i_tga.c
+++ b/i_tga.c
@@ -155,7 +155,8 @@
 	*p++ = h & 0xff; *p++ = h>>8; /* h */
 	*p++ = 24; /* bpp */
 	*p++ = FlagOriginTop; /* flags */
-	memmove(p, id, n); p += n; /* id */
+	if(id != nil)
+		memmove(p, id, n); p += n; /* id */
 	n = w * h;
 	for(i = 0; i < n; i++){
 		*p++ = pix[i] >> 0;