From 6894964725ad1553f3283ed489199f643d5eb116 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20J=2E=20Iglesias=20Garc=C3=ADa?= Date: Wed, 1 May 2024 09:58:36 +0200 Subject: [PATCH] Fix overflow in floating point multiplication --- src/ta_func/ta_MULT.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ta_func/ta_MULT.c b/src/ta_func/ta_MULT.c index 0c0e4b614..2348642ee 100644 --- a/src/ta_func/ta_MULT.c +++ b/src/ta_func/ta_MULT.c @@ -255,7 +255,7 @@ /* Generated */ #else /* Generated */ for( i=startIdx, outIdx=0; i <= endIdx; i++, outIdx++ ) /* Generated */ { -/* Generated */ outReal[outIdx] = inReal0[i]*inReal1[i]; +/* Generated */ outReal[outIdx] = ((double)inReal0[i])*inReal1[i]; /* Generated */ } /* Generated */ #endif /* Generated */ VALUE_HANDLE_DEREF(outNBElement) = outIdx;