# HG changeset patch # User nicodvb # Date 1196809438 0 # Node ID e60fce5af518ecfcbfc55bda0c7cd192bfb805a4 # Parent 9abc06e356ff3b3e553c7e12b2be5613c5e667ac in B2N_64 always append ULL to the hex bitmasks to force conversion of the expression to 64 bit and prevent overflow; patch by VLC team diff -r 9abc06e356ff -r e60fce5af518 dvdread/bswap.h --- a/dvdread/bswap.h Thu Nov 29 23:24:05 2007 +0000 +++ b/dvdread/bswap.h Tue Dec 04 23:03:58 2007 +0000 @@ -81,14 +81,14 @@ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)) #define B2N_64(x) \ - x = ((((x) & 0xff00000000000000) >> 56) | \ - (((x) & 0x00ff000000000000) >> 40) | \ - (((x) & 0x0000ff0000000000) >> 24) | \ - (((x) & 0x000000ff00000000) >> 8) | \ - (((x) & 0x00000000ff000000) << 8) | \ - (((x) & 0x0000000000ff0000) << 24) | \ - (((x) & 0x000000000000ff00) << 40) | \ - (((x) & 0x00000000000000ff) << 56)) + x = ((((x) & 0xff00000000000000ULL) >> 56) | \ + (((x) & 0x00ff000000000000ULL) >> 40) | \ + (((x) & 0x0000ff0000000000ULL) >> 24) | \ + (((x) & 0x000000ff00000000ULL) >> 8) | \ + (((x) & 0x00000000ff000000ULL) << 8) | \ + (((x) & 0x0000000000ff0000ULL) << 24) | \ + (((x) & 0x000000000000ff00ULL) << 40) | \ + (((x) & 0x00000000000000ffULL) << 56)) #else