Hi all,
I have problem while reading a signed integer from server. In the SFS2X C++, the function "boost::shared_ptr <ByteArray> btrd->ReadInt" is always return a positive value.
Hope everyone to help for me to solve this problem
Thank in advanced!
How to read a signed integer from ByteArray
Moderators: Lapo, Bax, MBagnati
Re: How to read a signed integer from ByteArray
Hello,
I was able to reproduce the problem. There seem to be an issue with type conversion.
We're working on releasing a patch soon.
Stay tuned.
I was able to reproduce the problem. There seem to be an issue with type conversion.
We're working on releasing a patch soon.
Stay tuned.
Re: How to read a signed integer from ByteArray
After some testcase, the function ReadInt only has problem with 64-bit arch. In the 32-bit arch, it's work well
Re: How to read a signed integer from ByteArray
Yes, it's due to the variability of type sizes such as int / long int etc... which on 32bit platforms use 4 bytes and on 64bit systems use 8 bytes.
I'll report back when it's fixed.
I'll report back when it's fixed.
Re: How to read a signed integer from ByteArray
UPDATE:
we have fixed the problem and should be able to publish a new update on Monday (tomorrow is national holiday over here).
I will post the link here when it's online.
Cheers
we have fixed the problem and should be able to publish a new update on Monday (tomorrow is national holiday over here).
I will post the link here when it's online.
Cheers
Re: How to read a signed integer from ByteArray
UPDATE 2:
We have released an update of the API that fixes this issue:
http://smartfoxserver.com/download/sfs2x#p=client
Thanks
We have released an update of the API that fixes this issue:
http://smartfoxserver.com/download/sfs2x#p=client
Thanks
Re: How to read a signed integer from ByteArray
Bravo
Thank in advanced
Thank in advanced
Who is online
Users browsing this forum: No registered users and 21 guests