From 9327388ae0a5a520ae30b2f89c147659f4012cb1 Mon Sep 17 00:00:00 2001 From: Darryl Miles Date: Mon, 30 Sep 2024 07:46:19 +0100 Subject: [PATCH] ext2spice/ext2hier.c: Multiplication result converted to larger type Fix code scanning alert no. 42: Multiplication result converted to larger type (#65) Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- ext2spice/ext2hier.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext2spice/ext2hier.c b/ext2spice/ext2hier.c index e03b647a..fbde50e0 100644 --- a/ext2spice/ext2hier.c +++ b/ext2spice/ext2hier.c @@ -332,8 +332,8 @@ spcHierWriteParams(hc, dev, scale, l, w, sdM) if (esScale < 0) fprintf(esSpiceF, "%g", dev->dev_rect.r_ybot * scale); else if (plist->parm_scale != 1.0) - fprintf(esSpiceF, "%g", dev->dev_rect.r_ybot * scale - * esScale * plist->parm_scale * 1E-6); + fprintf(esSpiceF, "%g", (double)dev->dev_rect.r_ybot * (double)scale + * (double)esScale * (double)plist->parm_scale * 1E-6); else esSIvalue(esSpiceF, (dev->dev_rect.r_ybot + plist->parm_offset) * scale * esScale * 1.0E-6);