ofxparser icon indicating copy to clipboard operation
ofxparser copied to clipboard

Fix incorrect regex for amount conversion.

Open enobrev opened this issue 8 years ago • 1 comments

The regex in Ofx::createAmountFromStr included a "?" after the "mark" whether it be decimal or comma. That "?" made it match number strings regardless of whether they had a "mark" to parse out, and grossly changed their value.

This made amounts such as 1000 or -1000 convert to 10 or -10. Removing the conditional after the mark resolved this issue. There are new tests to show that this resolves the issue without breaking others.

Resolves #19

enobrev avatar Dec 28 '16 16:12 enobrev

I feel that it's fairly unlikely that many of the users are even aware that they are occasionally getting incorrect results. It would be rather difficult for someone to account for this behavior in their implementation of the library too.

Do you have a rough idea of when the next major release will be up?

oceanapplications avatar Feb 27 '17 07:02 oceanapplications