one getnumber bug, pls correct me if I am wrong

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

iphoneonly118
Posts: 7
Joined: 30 Nov 2009, 15:08

one getnumber bug, pls correct me if I am wrong

Postby iphoneonly118 » 30 Nov 2009, 15:34

Hi,
Seems found one bug, if it is not, pls correct me:)
I used getnumber to get double from client. Since there is only double parameter available and my original intension is transfer long. So I did convert before put, like below:
client: new hashtable, then
Hashtable param = new Hashtable();
long test = 0x0a00000100000001
param["test"] = (double)test;
server:
long test =(long)request.getNumber("test");
what I got in server is 0x0a00000100000180
according to IEEE, since the double value is lower than MAX value of long, it shoud be exactly same with input value, without any lost.

This is my question.

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 11 guests