Project

General

Profile

Actions

Bug #6437

closed

Payment::Money::cents() casting bug

Added by Saif Rehman almost 7 years ago. Updated over 6 years ago.

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);}
Actions #1

Updated by Roel Standaert almost 7 years ago

  • Status changed from New to Resolved
Actions #2

Updated by Roel Standaert over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF