diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp index ed8d6d54..dcaf58ef 100644 --- a/taglib/flac/flacfile.cpp +++ b/taglib/flac/flacfile.cpp @@ -173,7 +173,7 @@ bool FLAC::File::save() ByteVector header = readBlock(4); char blockType = header[0] & 0x7f; - isLastBlock = header[0] & 0x80; + isLastBlock = (header[0] & 0x80) != 0; uint blockLength = header.mid(1, 3).toUInt(); if(blockType == VorbisComment) { @@ -191,7 +191,7 @@ bool FLAC::File::save() seek(firstBlockOffset); ByteVector header = readBlock(4); - bool isLastBlock = header[0] & 0x80; + bool isLastBlock = (header[0] & 0x80) != 0; uint blockLength = header.mid(1, 3).toUInt(); if(isLastBlock) { @@ -384,7 +384,7 @@ void FLAC::File::scan() // <24> Length of metadata to follow char blockType = header[0] & 0x7f; - bool isLastBlock = header[0] & 0x80; + bool isLastBlock = (header[0] & 0x80) != 0; uint length = header.mid(1, 3).toUInt(); // First block should be the stream_info metadata @@ -403,7 +403,7 @@ void FLAC::File::scan() while(!isLastBlock) { header = readBlock(4); blockType = header[0] & 0x7f; - isLastBlock = header[0] & 0x80; + isLastBlock = (header[0] & 0x80) != 0; length = header.mid(1, 3).toUInt(); if(blockType == Padding) { diff --git a/taglib/ogg/flac/oggflacfile.cpp b/taglib/ogg/flac/oggflacfile.cpp index ecd5dcb2..132bb80d 100644 --- a/taglib/ogg/flac/oggflacfile.cpp +++ b/taglib/ogg/flac/oggflacfile.cpp @@ -216,7 +216,7 @@ void Ogg::FLAC::File::scan() // <24> Length of metadata to follow char blockType = header[0] & 0x7f; - bool lastBlock = header[0] & 0x80; + bool lastBlock = (header[0] & 0x80) != 0; uint length = header.mid(1, 3).toUInt(); overhead += length; @@ -239,7 +239,7 @@ void Ogg::FLAC::File::scan() header = metadataHeader.mid(0, 4); blockType = header[0] & 0x7f; - lastBlock = header[0] & 0x80; + lastBlock = (header[0] & 0x80) != 0; length = header.mid(1, 3).toUInt(); overhead += length;