shithub: riscv

Download patch

ref: 69d2f49c1ac1de82e6f75a167799ad934f67579b
parent: 53e56b2e3da9f3e4f7232530d90344ea47557ce0
author: Jacob Moody <moody@posixcafe.org>
date: Wed Apr 9 16:43:43 EDT 2025

libmemdraw: initialize min in allocmemsubfont (thanks noam)

f->min was added to accomodate subfonts that contain
more than ascii, however getmemdefont would create a
Memsubfont with min unitialized.

--- a/sys/src/libmemdraw/subfont.c
+++ b/sys/src/libmemdraw/subfont.c
@@ -11,6 +11,7 @@
 	f = malloc(sizeof(Memsubfont));
 	if(f == 0)
 		return 0;
+	f->min = 0;
 	f->n = n;
 	f->height = height;
 	f->ascent = ascent;
--