Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

I think I finally got one lol #19

Closed
jargoman opened this issue Feb 10, 2014 · 3 comments
Closed

I think I finally got one lol #19

jargoman opened this issue Feb 10, 2014 · 3 comments

Comments

@jargoman
Copy link

RippleBinarySerializer method readAmount line 129
You forgot to add the sign to BigDecimal fractionalValue
BigInteger biMagnitude = BigInteger.valueOf(longMagnitude);
should be...
BigInteger biMagnitude = BigInteger.valueOf(longMagnitude * sign);

or if you'd rather
if (sign<0) {
fractionalValue.negate();
}

pmarches added a commit that referenced this issue Feb 12, 2014
@pmarches
Copy link
Owner

Good catch!

The sign was used for XRP values, but not for issued currencies. I made the
change and pushed it to github.

Thanks!

On Mon, Feb 10, 2014 at 12:28 AM, jargoman notifications@github.com wrote:

RippleBinarySerializer method readAmount line 129
You forgot to add the sign to BigDecimal fractionalValue
BigInteger biMagnitude = BigInteger.valueOf(longMagnitude);
should be...
BigInteger biMagnitude = BigInteger.valueOf(longMagnitude * sign);

or if you'd rather
if (sign<0) {
fractionalValue.negate();
}

Reply to this email directly or view it on GitHubhttps://github.com//issues/19
.

@nybbs2003
Copy link
Contributor

should't this be closed as it is solved?

@pmarches
Copy link
Owner

pmarches commented Feb 1, 2015

Indeed, I thought I had.

@pmarches pmarches closed this as completed Feb 1, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants