Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cf-dev] Bug in Option.getLongValue()?

Done and done. 

-Joe

On Thu, Dec 31, 2015 at 2:18 AM Kai <sophokles.kh@xxxxxxxxx> wrote:
Yes, that would be the easiest way :-) Have you signed the CLA? Please also make sure that you include a "Signe-off-by" footer in your commit message indicating your name and email address as used for the CLA.

Happy new year :-)
Kai

On Wed, Dec 30, 2015 at 8:53 PM Joe Magerramov <joe.magerramov@xxxxxxxxx> wrote:
Sounds good. What's the process for contributing? Should I just send a pul request?

On Tue, Dec 29, 2015 at 3:16 AM Kai <sophokles.kh@xxxxxxxxx> wrote:
Hi Joe,

thanks for pointing this out :-) I understand that you have not (yet) signed an Eclipse Contributor License Agreement (CLA) [1] which is required for us to accept any code contributed by you (and for which you would get credit by means of showing up in the project's list of contributors). Signing the CLA is no big deal and it would allow for you to contribute to each project hosted at eclipse (not just Californium) more easily in the future. However, if this is too much of a nuisance for you, I'd also be happy to just fix it myself. We'd be happy to get you involved and have you as contributor :-) However, it's up to you ...


Regards,
Kai

On Tue, Dec 22, 2015 at 1:17 AM Joe Magerramov <joe.magerramov@xxxxxxxxx> wrote:
new Option(10, 8611588610L).getLongValue()

returns 21654020.
The bit shift is performed on int32, so overflows on any value that is longer than 32bits. A cast should fix it:

public long getLongValue() {
   long ret = 0;
   for (int i=0;i<value.length;i++) {
        ret += (long) (value[value.length - i - 1] & 0xFF) << (i*8);
    }
    return ret;
}

_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev
_______________________________________________
cf-dev mailing list
cf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cf-dev

Back to the top