]> 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)
committerNaveen Albert <asterisk@phreaknet.org>
Tue, 30 Apr 2024 15:17:10 +0000 (15:17 +0000)
commitb836f9c01ce5c4649ed275b2bdc547233b34ada0
tree2c20aa81a341755f9f0ea84c6b726fafe8d2fa9a
parentc276ae11e0c0769b030f509164ad39f4c484d6c3
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
funcs/func_sayfiles.c
main/say.c