From e935cc68e9098fcc822630b1649ced4e2bfab200 Mon Sep 17 00:00:00 2001 From: murray Date: Wed, 19 Jan 2022 19:15:14 +0000 Subject: [PATCH] initialize glyph buffers to zero --- Makefile | 2 +- glyph.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5639d4d..8157695 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ WAYLAND_SCANNER := wayland-scanner PREFIX ?= /usr/local BINDIR ?= $(PREFIX)/bin -VERSION="0.3.1-git" +VERSION="0.4.0" CFLAGS ?= -Wall -Wextra -Wno-unused-parameter -Wno-parentheses override CFLAGS += -DVERSION=\"$(VERSION)\" diff --git a/glyph.c b/glyph.c index 592c154..f7d9403 100644 --- a/glyph.c +++ b/glyph.c @@ -1470,7 +1470,7 @@ unsigned char *new_glyph(uint32_t id, uint32_t c, int cwidth) NULL }; - bm.pixels = malloc(bm.w * bm.h); + bm.pixels = calloc(1, bm.w * bm.h); get_glyph_origin(&font, glyph, &xmin, &ymin); render(&bm, 0.35f, vertices, vcount, font.scale, font.scale,