Actions
Bug #6437
closedPayment::Money::cents() casting bug
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/08/2018
Due date:
% Done:
0%
Estimated time:
Description
Hi,
I noticed the function
int cents() const {return (int) valueInCents_ % 100;}
has a problem that it is casting incorrectly. It is casting valueInCents_ first and then applying the modulo and it should be
int cents() const {return (int) (valueInCents_ % 100);}
Updated by Roel Standaert almost 7 years ago
- Status changed from New to Resolved
Updated by Roel Standaert over 6 years ago
- Status changed from Resolved to Closed
Actions