| Summary: | Empty xiph comments not removed as documented | ||
|---|---|---|---|
| Product: | [Unmaintained] taglib | Reporter: | Stephen F. Booth <me> |
| Component: | general | Assignee: | Scott Wheeler <wheeler> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Other | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
SVN commit 672863 by wheeler: Remove empty Xiph comments. Patch from Stephan Booth. BUG:145532 CCMAIL:taglib-devel@kde.org M +1 -1 xiphcomment.cpp --- trunk/kdesupport/taglib/taglib/ogg/xiphcomment.cpp #672862:672863 @@ -188,7 +188,7 @@ if(replace) removeField(key.upper()); - if(!key.isEmpty()) + if(!key.isEmpty() && !value.isEmpty()) d->fieldListMap[key.upper()].append(value); } |
Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc version 4.0.1 (Apple Computer, Inc. build 5367) OS: OS X The documentation for Ogg::XiphComment::addField says "If the field value is empty, the field will be removed." This is implemented incorrectly; this patch fixes the behavior to match the documentation. Index: xiphcomment.cpp =================================================================== --- xiphcomment.cpp (revision 651409) +++ xiphcomment.cpp (working copy) @@ -188,7 +188,7 @@ if(replace) removeField(key.upper()); - if(!key.isEmpty()) + if(!value.isEmpty()) d->fieldListMap[key.upper()].append(value); }