Skip to content

Commit 17744b9

Browse files
committed
MimeDetector: correct memcmp
1 parent ea0c756 commit 17744b9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/AudioTools/CoreAudio/MimeDetector.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ class MimeDetector {
6464
const uint8_t* start = (const uint8_t*)data;
6565
if (start[0] == 0xFF && start[1] == 0xF1) {
6666
mime = "audio/aac";
67-
} else if (memcmp(start, "ID3", 3) || start[0] == 0xFF ||
68-
start[0] == 0xFE) {
67+
} else if (memcmp(start, "ID3", 3)==0 || start[0] == 0xFF || start[0] == 0xFE) {
6968
mime = "audio/mpeg";
70-
} else if (memcmp(start, "RIFF", 4)) {
69+
} else if (memcmp(start, "RIFF", 4)==0) {
7170
mime = "audio/vnd.wave";
72-
} else if (memcmp(start, "OggS", 4)) {
71+
} else if (memcmp(start, "OggS", 4)==0) {
7372
mime = "audio/ogg";
7473
}
7574
}

0 commit comments

Comments
 (0)