From cde5418e7d589c063bfe40b21a13d65da5b3898e Mon Sep 17 00:00:00 2001 From: Darryl Miles Date: Mon, 30 Sep 2024 07:46:35 +0100 Subject: [PATCH] ext2spice/ext2spice.c: Multiplication result converted to larger type Fix code scanning alert no. 43: Multiplication result converted to larger type (#59) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- ext2spice/ext2spice.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext2spice/ext2spice.c b/ext2spice/ext2spice.c index d57f27bc..54dff3d7 100644 --- a/ext2spice/ext2spice.c +++ b/ext2spice/ext2spice.c @@ -2011,8 +2011,8 @@ spcWriteParams(dev, hierName, scale, l, w, sdM) if (esScale < 0) fprintf(esSpiceF, "%g", parmval * scale * scale); else if (plist->parm_scale != 1.0) - fprintf(esSpiceF, "%g", parmval * scale * scale - * esScale * esScale * plist->parm_scale + fprintf(esSpiceF, "%g", (double)parmval * (double)scale * (double)scale + * (double)esScale * (double)esScale * plist->parm_scale * 1E-12); else esSIvalue(esSpiceF, 1.0E-12 * (parmval + plist->parm_offset)