From: Tsuda Kageyu Date: Mon, 19 Dec 2016 01:37:10 +0000 (+0900) Subject: Safer conversion of boolean values in ASF attributes. X-Git-Tag: v1.12-beta-1~95 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8905e7095aa97dac4a047adca9e040f2e9ea1ffa;p=taglib Safer conversion of boolean values in ASF attributes. Technically, boolean values in Extended Content Description Object is not necessarily be 0 or 1. --- diff --git a/taglib/asf/asfattribute.cpp b/taglib/asf/asfattribute.cpp index 1e6ed705..66c1996a 100644 --- a/taglib/asf/asfattribute.cpp +++ b/taglib/asf/asfattribute.cpp @@ -217,10 +217,10 @@ String ASF::Attribute::parse(ASF::File &f, int kind) case BoolType: if(kind == 0) { - d->boolValue = (readDWORD(&f) == 1); + d->boolValue = (readDWORD(&f) != 0); } else { - d->boolValue = (readWORD(&f) == 1); + d->boolValue = (readWORD(&f) != 0); } break;