[libbdplus-devel] Fix shift

anonymous git at videolan.org
Fri Mar 3 14:33:01 CET 2017


libbdplus | branch: master | anonymous <anonymous at anonymous.org> | Fri Mar  3 14:58:30 2017 +0200| [9a59dc5a5bdf000fa4ba304912aa0e959ed208f6] | committer: anonymous

Fix shift

> http://git.videolan.org/gitweb.cgi/libbdplus.git/?a=commit;h=9a59dc5a5bdf000fa4ba304912aa0e959ed208f6
---

 src/util/macro.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/macro.h b/src/util/macro.h
index d8b2e32..6774c1e 100644
--- a/src/util/macro.h
+++ b/src/util/macro.h
@@ -25,7 +25,7 @@
 
 #define MKINT_BE16(X) ( (X)[0] << 8 | (X)[1] )
 #define MKINT_BE24(X) ( (X)[0] << 16 | (X)[1] << 8 | (X)[2] )
-#define MKINT_BE32(X) ( (X)[0] << 24 | (X)[1] << 16 |  (X)[2] << 8 | (X)[3] )
+#define MKINT_BE32(X) ( (unsigned)((X)[0]) << 24 | (X)[1] << 16 |  (X)[2] << 8 | (X)[3] )
 #define X_FREE(X)     ( free(X), X = NULL )
 
 #define BD_MIN(a,b) ((a)<(b)?(a):(b))



More information about the libbdplus-devel mailing list