libfreerdp-core: TPKT length is big-endian.

This commit is contained in:
Vic Lee
2011-07-03 18:01:37 +08:00
parent 5036f150e4
commit addc192965
2 changed files with 11 additions and 2 deletions

View File

@@ -116,5 +116,14 @@ stream_extend(STREAM * stream);
(((uint64)(*(_s->ptr + 7))) << 56); \
} while (0)
#define stream_read_uint16_be(_s, _v) do { _v = \
(((uint16)(*_s->ptr)) << 8) + \
(uint16)(*(_s->ptr + 1)); \
_s->ptr += 2; } while (0)
#define stream_write_uint16_be(_s, _v) do { \
*_s->ptr++ = ((_v) >> 8) & 0xFF; \
*_s->ptr++ = (_v) & 0xFF; } while (0)
#endif /* __STREAM_UTILS_H */