Improved an internal allocation

Improved the way that the internal array,
consttable, is allocated.
This commit is contained in:
Landon Curt Noll
2021-10-22 03:09:08 -07:00
parent 286233e28f
commit 94861cc6d2

View File

@@ -44,7 +44,7 @@ initconstants(void)
{ {
int i; int i;
consttable = (NUMBER **) malloc(sizeof(NUMBER *) * CONSTALLOCSIZE); consttable = (NUMBER **) calloc(sizeof(NUMBER *), CONSTALLOCSIZE);
if (consttable == NULL) { if (consttable == NULL) {
math_error("Unable to allocate constant table"); math_error("Unable to allocate constant table");
/*NOTREACHED*/ /*NOTREACHED*/