projects
/
taglib
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32a4ac6
)
Verify that an APE text item isn't empty before use
author
Stephen F. Booth
<me@sbooth.org>
Thu, 12 Apr 2012 14:53:32 +0000
(10:53 -0400)
committer
Stephen F. Booth
<me@sbooth.org>
Thu, 12 Apr 2012 14:53:32 +0000
(10:53 -0400)
taglib/ape/apeitem.cpp
patch
|
blob
|
history
diff --git
a/taglib/ape/apeitem.cpp
b/taglib/ape/apeitem.cpp
index 1e60bc52f8b4b0d7121bc29216fb0a4154dee45b..ac0e26ed02b5a11863bdeb788bacd6ebd429b580 100644
(file)
--- a/
taglib/ape/apeitem.cpp
+++ b/
taglib/ape/apeitem.cpp
@@
-170,15
+170,15
@@
int APE::Item::size() const
int result = 8 + d->key.size() /* d->key.data(String::UTF8).size() */ + 1;
switch (d->type) {
case Text:
- {
+
if(d->text.size())
{
StringList::ConstIterator it = d->text.begin();
result += it->data(String::UTF8).size();
it++;
for(; it != d->text.end(); ++it)
result += 1 + it->data(String::UTF8).size();
- break;
}
+ break;
case Binary:
case Locator: