diff --git a/taglib/wavpack/wavpackproperties.cpp b/taglib/wavpack/wavpackproperties.cpp index a87a63be..8d7ab9ea 100644 --- a/taglib/wavpack/wavpackproperties.cpp +++ b/taglib/wavpack/wavpackproperties.cpp @@ -324,7 +324,7 @@ int WavPack::Properties::getNonStandardRate(unsigned char const *buffer, int bco // only use 4th byte if it's really there if (!(meta_id & ID_ODD_SIZE)) - sample_rate |= static_cast(buffer[3] & 0x7f) << 24; + sample_rate |= static_cast(*buffer & 0x7f) << 24; return sample_rate; }