diff --git a/taglib/mp4/mp4atom.cpp b/taglib/mp4/mp4atom.cpp index b12f9459..bd9c7b16 100644 --- a/taglib/mp4/mp4atom.cpp +++ b/taglib/mp4/mp4atom.cpp @@ -27,6 +27,8 @@ #include #endif +#include + #include #include #include "mp4atom.h" @@ -60,8 +62,8 @@ MP4::Atom::Atom(File *file) length = longLength; } else { - if(longLength <= 0xFFFFFFFF) { - // The atom has a 64-bit length, but it's actually a 32-bit value + if(longLength <= LONG_MAX) { + // The atom has a 64-bit length, but it's actually a 31-bit value length = (long)longLength; } else {