From 19dae96ebfde692c9ce7fec6d7b55d1b7e26b45b Mon Sep 17 00:00:00 2001 From: olivier Date: Sun, 22 May 2022 18:32:47 +0200 Subject: [PATCH] fix compile warning also spotted here : Fix inconsistent operators when reading filetype https://github.com/macosforge/alac/pull/20 --- convert-utility/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert-utility/main.cpp b/convert-utility/main.cpp index 998e9e6..5c8519d 100644 --- a/convert-utility/main.cpp +++ b/convert-utility/main.cpp @@ -200,17 +200,17 @@ int32_t GetInputFormat(FILE * inputFile, AudioFormatDescription * theInputFormat fread(theReadBuffer, 1, 4, inputFile); - if (theReadBuffer[0] == 'c' && theReadBuffer[1] == 'a' && theReadBuffer[2] == 'f' & theReadBuffer[3] == 'f') + if (theReadBuffer[0] == 'c' && theReadBuffer[1] == 'a' && theReadBuffer[2] == 'f' && theReadBuffer[3] == 'f') { // It's a caff file! *theFileType = 'caff'; // We support pcm data for encode and alac data for decode done = GetCAFFdescFormat(inputFile, theInputFormat); } - else if (theReadBuffer[0] == 'R' && theReadBuffer[1] == 'I' && theReadBuffer[2] == 'F' & theReadBuffer[3] == 'F') + else if (theReadBuffer[0] == 'R' && theReadBuffer[1] == 'I' && theReadBuffer[2] == 'F' && theReadBuffer[3] == 'F') { fread(theReadBuffer, 1, 8, inputFile); - if (theReadBuffer[4] == 'W' && theReadBuffer[5] == 'A' && theReadBuffer[6] == 'V' & theReadBuffer[7] == 'E') + if (theReadBuffer[4] == 'W' && theReadBuffer[5] == 'A' && theReadBuffer[6] == 'V' && theReadBuffer[7] == 'E') { // It's a WAVE file! *theFileType = 'WAVE';