libfreerdp-utils/stream: fix stream_read_uint32_be
authorMarc-André Moreau <marcandre.moreau@gmail.com>
Tue, 6 Mar 2012 13:48:55 +0000 (08:48 -0500)
committerMarc-André Moreau <marcandre.moreau@gmail.com>
Tue, 6 Mar 2012 13:48:55 +0000 (08:48 -0500)
include/freerdp/utils/stream.h

index c583dbd..a1c0569 100644 (file)
@@ -152,10 +152,10 @@ FREERDP_API void stream_extend(STREAM* stream, int request_size);
        (uint16)(*(_s->p + 1)); \
        _s->p += 2; } while (0)
 #define stream_read_uint32_be(_s, _v) do { _v = \
-       (((uint32)(*(_s->p))) << 8) + \
-       (((uint32)(*(_s->p + 1)))) + \
-       (((uint32)(*(_s->p + 2))) << 24) + \
-       (((uint32)(*(_s->p + 3))) << 16); \
+       (((uint32)(*(_s->p))) << 24) + \
+       (((uint32)(*(_s->p + 1))) << 16) + \
+       (((uint32)(*(_s->p + 2))) << 8) + \
+       (((uint32)(*(_s->p + 3)))); \
        _s->p += 4; } while (0)
 
 #define stream_write_uint16_be(_s, _v) do { \