On Wed, 11 May 2011 04:12:43 +0100, Doug <[email protected]> wrote:

> This function is returning really odd values, specifically breaking this  
> and
> forcing it to hang when this code is run:

Sounds like the input stream isn't aligned any more.

> why it's not working; should the << 8 be << 16 for 64 bit?)

No. Its trying to read a network byte order 16 bit value a byte
at a time.  The byte (0-255) is extended to a 16 bit value (ushort)
and then shifted up to the high byte in that.

If you break and just look at the contents of the buffer it is
reading the byte from, I'd expect the buffer contains data that
is consistent with the value being returned.

I suspect that the problem occurs previously in processing the stream.

James
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to