mirror of
https://github.com/taglib/taglib.git
synced 2025-07-14 11:04:17 -04:00
Safer conversion of boolean values in ASF attributes.
Technically, boolean values in Extended Content Description Object is not necessarily be 0 or 1.
This commit is contained in:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user