Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[convert_utility] typo in logical expression in main.cpp #10

Open
macosforgebot opened this issue Jul 6, 2012 · 2 comments
Open

[convert_utility] typo in logical expression in main.cpp #10

macosforgebot opened this issue Jul 6, 2012 · 2 comments

Comments

@macosforgebot
Copy link

nagamatu@… originally submitted this as ticket:11

  • Version: 1.0
  • Keywords: typo

Logical AND expression missed one AMPERSAND at format checking code of convert utility.

$ svn diff convert-utility/main.cpp 
Index: convert-utility/main.cpp
===================================================================
--- convert-utility/main.cpp    (revision 3)
+++ convert-utility/main.cpp    (working copy)
@@ -200,17 +200,17 @@

     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';
@macosforgebot
Copy link
Author

nagamatu@… originally submitted this as attachment:main.cpp.patch:⁠ticket:11

@macosforgebot
Copy link
Author

@ryandesign originally submitted this as comment:1:⁠ticket:11

  • Description modified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant