PDA

View Full Version : WriteLong problem


atavera
10-12-2006, 06:09 AM
I'm working on an Import/Export, got the import done, but WriteLong is rounding off numbers and thus writing the wrong numbers :\
ex.
WriteLong bstream 0xFFFF0001
gets read as an int first and rounds the number down
and writen to the stream as 0xFFFF0000

I can get around this by writing two shorts, but it seems kinda screwy as I could read it as a Long on the importer(well with bit.intAsHex). It would make sense to me that if there is a function to write long integers that it could write them up to 0xFFFFFFFF accurately. Is there any way around this other than splitting these into shorts?

Edit: Nevermind, just made a seperate function for writing long ids.

CGTalk Moderation
10-12-2006, 06:09 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.