Skip to content

Commit 84d1ee0

Browse files
committed
Fix incorrect bit operations
Credit to @lisanet refs: https://github.com/benfry/atomicparsley/pull/1
1 parent 03dc0f5 commit 84d1ee0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/id3v2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2823,7 +2823,7 @@ ID3v2Frame *APar_FindFrame(ID3v2Tag *id3v2tag,
28232823
if (supplemental_matching != 0) {
28242824

28252825
// match on description + frame name
2826-
if (supplemental_matching && 0x01 &&
2826+
if (supplemental_matching & 0x01 &&
28272827
evalframe->ID3v2_Frame_ID == frameID) {
28282828
char *utf8_descrip =
28292829
APar_ConvertField_to_UTF8(evalframe, ID3_DESCRIPTION_FIELD);

src/metalist.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -820,12 +820,12 @@ void APar_Print_iTunesData(const char *path,
820820
true); // just to know if 'free' atoms can be considered padding, or (in
821821
// the case of say a faac file) it's *just* 'free'
822822

823-
if (supplemental_info && 0x02) { // PRINT_FREE_SPACE
823+
if (supplemental_info & 0x02) { // PRINT_FREE_SPACE
824824
fprintf(stdout,
825825
"free atom space: %" PRIu32 "\n",
826826
APar_ProvideTallyForAtom("free"));
827827
}
828-
if (supplemental_info && 0x04) { // PRINT_PADDING_SPACE
828+
if (supplemental_info & 0x04) { // PRINT_PADDING_SPACE
829829
if (!moov_atom_was_mooved) {
830830
fprintf(stdout,
831831
"padding available: %" PRIu64 " bytes\n",
@@ -834,13 +834,13 @@ void APar_Print_iTunesData(const char *path,
834834
fprintf(stdout, "padding available: 0 (reorg)\n");
835835
}
836836
}
837-
if (supplemental_info && 0x08 &&
837+
if (supplemental_info & 0x08 &&
838838
dynUpd.moov_udta_atom != NULL) { // PRINT_USER_DATA_SPACE
839839
fprintf(stdout,
840840
"user data space: %" PRIu64 "\n",
841841
dynUpd.moov_udta_atom->AtomicLength);
842842
}
843-
if (supplemental_info && 0x10) { // PRINT_USER_DATA_SPACE
843+
if (supplemental_info & 0x10) { // PRINT_USER_DATA_SPACE
844844
fprintf(stdout,
845845
"media data space: %" PRIu32 "\n",
846846
APar_ProvideTallyForAtom("mdat"));

0 commit comments

Comments
 (0)