Skip to content

Commit

Permalink
initialize glyph buffers to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
ii8 committed Jan 19, 2022
1 parent c816cbb commit e935cc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)\"
Expand Down
2 changes: 1 addition & 1 deletion glyph.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e935cc6

Please sign in to comment.