libansilove

Library for converting ANSI, ASCII, and other formats to PNG
Log | Files | Refs | README | LICENSE

commit d6a49730b7a0f2daacf7e45fd6b4e02f55132603
parent 9ce79a86b29057c50e39669be9341fc6f068db37
Author: Frederic Cambus <fred@statdns.com>
Date:   Thu,  7 May 2020 16:51:29 +0200

Call memset() to set all fontData struct fields to zero in all loaders.

Diffstat:
Msrc/loaders/binary.c | 1+
Msrc/loaders/pcboard.c | 1+
Msrc/loaders/tundra.c | 1+
3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/loaders/binary.c b/src/loaders/binary.c @@ -32,6 +32,7 @@ ansilove_binary(struct ansilove_ctx *ctx, struct ansilove_options *options) struct fontStruct fontData; /* font selection */ + memset(&fontData, 0, sizeof(struct fontStruct)); select_font(&fontData, options->font); /* libgd image pointers */ diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c @@ -51,6 +51,7 @@ ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options) uint16_t columns = options->columns; /* font selection */ + memset(&fontData, 0, sizeof(struct fontStruct)); select_font(&fontData, options->font); /* libgd image pointers */ diff --git a/src/loaders/tundra.c b/src/loaders/tundra.c @@ -51,6 +51,7 @@ ansilove_tundra(struct ansilove_ctx *ctx, struct ansilove_options *options) int16_t columns = options->columns; /* font selection */ + memset(&fontData, 0, sizeof(struct fontStruct)); select_font(&fontData, options->font); /* libgd image pointers */