]> git.ipfire.org Git - thirdparty/asterisk.git/commit
say.c: Fix cents off-by-one due to floating point rounding.
authorNaveen Albert <asterisk@phreaknet.org>
Wed, 10 Jan 2024 13:26:05 +0000 (08:26 -0500)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 9 May 2024 13:47:40 +0000 (13:47 +0000)
commit62f9c54f4c31195b4f215956b2840341186fe06b
tree373ab2a2dadd1c542d40be0d15636629a9b121b6
parent46ddecb3d549494e4f55a14230ca21bded54d2fc
say.c: Fix cents off-by-one due to floating point rounding.

Some of the money announcements can be off by one cent,
due to the use of floating point in the money calculations,
which is bad for obvious reasons.

This replaces floating point with simple string parsing
to ensure the cents value is converted accurately.

Resolves: #525
(cherry picked from commit b836f9c01ce5c4649ed275b2bdc547233b34ada0)
funcs/func_sayfiles.c
main/say.c