Fixed a crash of APE::Item::toString() when the data type is binary

This commit is contained in:
Tsuda Kageyu
2013-07-14 02:28:57 +09:00
parent 3a636c752b
commit 4d126c49e9
3 changed files with 33 additions and 18 deletions

View File

@ -95,7 +95,10 @@ int main(int argc, char *argv[])
for(APE::ItemListMap::ConstIterator it = ape->itemListMap().begin();
it != ape->itemListMap().end(); ++it)
{
cout << (*it).first << " - \"" << (*it).second.toString() << "\"" << endl;
if((*it).second.type() != APE::Item::Binary)
cout << (*it).first << " - \"" << (*it).second.toString() << "\"" << endl;
else
cout << (*it).first << " - Binary data (" << (*it).second.binaryData().size() << " bytes)" << endl;
}
}
else