diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-16 10:01:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-24 13:27:26 +0200 |
commit | c8b5ac2a54af99e32f77aa07dec0dda2be074289 (patch) | |
tree | 4391c37c94d84985ecfa63387ed31cc5b45f0f00 /tools/source/misc | |
parent | fff43a2e76dd6e6892a9c447edf60a44ba1a345e (diff) |
cid#1607586 Overflowed return value
and
cid#1608074 Overflowed return value
cid#1607598 Overflowed return value
Change-Id: Ib884c10083c01578a7a0926d5f2f3c2d1f7501c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173833
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'tools/source/misc')
-rw-r--r-- | tools/source/misc/fix16.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/misc/fix16.cxx b/tools/source/misc/fix16.cxx index 95104bbbb9de..b726acb8f660 100644 --- a/tools/source/misc/fix16.cxx +++ b/tools/source/misc/fix16.cxx @@ -70,7 +70,7 @@ fix16_t fix16_mul(fix16_t inArg0, fix16_t inArg1) return fix16_overflow; } - fix16_t result = static_cast<fix16_t>(product >> 16); + fix16_t result = (product >> 16) & 0xFFFF; result += (product & 0x8000) >> 15; return result; |