From 94861cc6d22854d664cab1e2fbe6fcd35f95605f Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Fri, 22 Oct 2021 03:09:08 -0700 Subject: [PATCH] Improved an internal allocation Improved the way that the internal array, consttable, is allocated. --- const.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/const.c b/const.c index 704a3f0..61a6b1d 100644 --- a/const.c +++ b/const.c @@ -44,7 +44,7 @@ initconstants(void) { int i; - consttable = (NUMBER **) malloc(sizeof(NUMBER *) * CONSTALLOCSIZE); + consttable = (NUMBER **) calloc(sizeof(NUMBER *), CONSTALLOCSIZE); if (consttable == NULL) { math_error("Unable to allocate constant table"); /*NOTREACHED*/