commit 992ef7ec0d8dc889bf4f1196d5b920e7ed90cb33
parent 1fd556ed4269c5274f51a21719cd9fab72b8378a
Author: Frederic Cambus <fred@statdns.com>
Date: Tue, 17 Jul 2018 13:46:08 +0200
Zero out both structs in ansilove_init() before filling default values
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/init.c b/src/init.c
@@ -13,6 +13,9 @@
void
ansilove_init(struct ansilove_ctx *ctx, struct ansilove_options *options) {
+ memset(ctx, 0, sizeof(*ctx));
+ memset(options, 0, sizeof(*options));
+
// default to 8 if bits option is not specified
options->bits = 8;