Skip to content

Commit

Permalink
Fix incorrect bit operations
Browse files Browse the repository at this point in the history
  • Loading branch information
wez committed Jul 1, 2020
1 parent 03dc0f5 commit 84d1ee0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/id3v2.cpp
Expand Up @@ -2823,7 +2823,7 @@ ID3v2Frame *APar_FindFrame(ID3v2Tag *id3v2tag,
if (supplemental_matching != 0) {

// match on description + frame name
if (supplemental_matching && 0x01 &&
if (supplemental_matching & 0x01 &&
evalframe->ID3v2_Frame_ID == frameID) {
char *utf8_descrip =
APar_ConvertField_to_UTF8(evalframe, ID3_DESCRIPTION_FIELD);
Expand Down
8 changes: 4 additions & 4 deletions src/metalist.cpp
Expand Up @@ -820,12 +820,12 @@ void APar_Print_iTunesData(const char *path,
true); // just to know if 'free' atoms can be considered padding, or (in
// the case of say a faac file) it's *just* 'free'

if (supplemental_info && 0x02) { // PRINT_FREE_SPACE
if (supplemental_info & 0x02) { // PRINT_FREE_SPACE
fprintf(stdout,
"free atom space: %" PRIu32 "\n",
APar_ProvideTallyForAtom("free"));
}
if (supplemental_info && 0x04) { // PRINT_PADDING_SPACE
if (supplemental_info & 0x04) { // PRINT_PADDING_SPACE
if (!moov_atom_was_mooved) {
fprintf(stdout,
"padding available: %" PRIu64 " bytes\n",
Expand All @@ -834,13 +834,13 @@ void APar_Print_iTunesData(const char *path,
fprintf(stdout, "padding available: 0 (reorg)\n");
}
}
if (supplemental_info && 0x08 &&
if (supplemental_info & 0x08 &&
dynUpd.moov_udta_atom != NULL) { // PRINT_USER_DATA_SPACE
fprintf(stdout,
"user data space: %" PRIu64 "\n",
dynUpd.moov_udta_atom->AtomicLength);
}
if (supplemental_info && 0x10) { // PRINT_USER_DATA_SPACE
if (supplemental_info & 0x10) { // PRINT_USER_DATA_SPACE
fprintf(stdout,
"media data space: %" PRIu32 "\n",
APar_ProvideTallyForAtom("mdat"));
Expand Down

0 comments on commit 84d1ee0

Please sign in to comment.