1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-18 04:19:55 +01:00

Patch a weird big endian swap thing in taglib

This commit is contained in:
David Sansome 2013-08-18 12:44:47 +10:00
parent 4411b25e86
commit 1430cc4114
2 changed files with 24 additions and 2 deletions

View File

@ -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);

View File

@ -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);