From 1430cc4114de7d5a1e994fc940a04cfa917a2376 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Sun, 18 Aug 2013 12:44:47 +1000 Subject: [PATCH] Patch a weird big endian swap thing in taglib --- .../taglib/patches/02-swap-big-endian.patch | 22 +++++++++++++++++++ 3rdparty/taglib/toolkit/tbytevector.cpp | 4 ++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 3rdparty/taglib/patches/02-swap-big-endian.patch diff --git a/3rdparty/taglib/patches/02-swap-big-endian.patch b/3rdparty/taglib/patches/02-swap-big-endian.patch new file mode 100644 index 000000000..e2a9e472f --- /dev/null +++ b/3rdparty/taglib/patches/02-swap-big-endian.patch @@ -0,0 +1,22 @@ +diff --git a/3rdparty/taglib/toolkit/tbytevector.cpp b/3rdparty/taglib/toolkit/tbytevector.cpp +index ddc3d4f..f36758f 100644 +--- a/3rdparty/taglib/toolkit/tbytevector.cpp ++++ b/3rdparty/taglib/toolkit/tbytevector.cpp +@@ -218,7 +218,7 @@ T toNumber(const ByteVector &v, size_t offset, bool mostSignificantByteFirst) + #if SYSTEM_BYTEORDER == 1 + const bool swap = mostSignificantByteFirst; + #else +- const bool swap != mostSignificantByteFirst; ++ const bool swap = !mostSignificantByteFirst; + #endif + if(swap) + return byteSwap(tmp); +@@ -234,7 +234,7 @@ ByteVector fromNumber(T value, bool mostSignificantByteFirst) + #if SYSTEM_BYTEORDER == 1 + const bool swap = mostSignificantByteFirst; + #else +- const bool swap != mostSignificantByteFirst; ++ const bool swap = !mostSignificantByteFirst; + #endif + if(swap) + value = byteSwap(value); diff --git a/3rdparty/taglib/toolkit/tbytevector.cpp b/3rdparty/taglib/toolkit/tbytevector.cpp index ddc3d4f43..f36758f5c 100644 --- a/3rdparty/taglib/toolkit/tbytevector.cpp +++ b/3rdparty/taglib/toolkit/tbytevector.cpp @@ -218,7 +218,7 @@ T toNumber(const ByteVector &v, size_t offset, bool mostSignificantByteFirst) #if SYSTEM_BYTEORDER == 1 const bool swap = mostSignificantByteFirst; #else - const bool swap != mostSignificantByteFirst; + const bool swap = !mostSignificantByteFirst; #endif if(swap) return byteSwap(tmp); @@ -234,7 +234,7 @@ ByteVector fromNumber(T value, bool mostSignificantByteFirst) #if SYSTEM_BYTEORDER == 1 const bool swap = mostSignificantByteFirst; #else - const bool swap != mostSignificantByteFirst; + const bool swap = !mostSignificantByteFirst; #endif if(swap) value = byteSwap(value);