diff options
-rw-r--r-- | utils/makehrtf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/makehrtf.c b/utils/makehrtf.c index 7c836b33..b6d269bb 100644 --- a/utils/makehrtf.c +++ b/utils/makehrtf.c @@ -771,10 +771,11 @@ static int HpTpdfDither (const double in, int * hpHist) { } // Allocates an array of doubles. -static double *CreateArray(const size_t n) +static double *CreateArray(size_t n) { double *a; + if(n == 0) n = 1; a = calloc(n, sizeof(double)); if(a == NULL) { |