]> 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-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Tue, 30 Apr 2024 15:17:21 +0000 (15:17 +0000)
commit7cffbabe5c9230fffbed6fbdbef3144fd29929df
tree0910cec6398949a7f3c78e8ed2c996dfc8e10d16
parent01ff5c8140e67fe480a04345e54b0e7a2c0cbd71
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