@ -60,6 +60,7 @@ namespace {
{ add , " add " } ,
{ set , " set " } ,
{ del , " del " } ,
{ reg , " reg " } ,
{ invalidCmdId , " invalidCmd " } // End of list marker
} ;
@ -886,6 +887,7 @@ namespace {
Exiv2 : : TypeId defaultType = Exiv2 : : invalidTypeId ;
std : : string key ( line . substr ( keyStart , keyEnd - keyStart ) ) ;
MetadataId metadataId = invalidMetadataId ;
if ( cmdId ! = reg ) {
try {
Exiv2 : : IptcKey iptcKey ( key ) ;
metadataId = iptc ;
@ -914,7 +916,7 @@ namespace {
throw Exiv2 : : Error ( 1 , Exiv2 : : toString ( num )
+ " : " + _ ( " Invalid key " ) + " ` " + key + " ' " ) ;
}
}
std : : string value ;
Exiv2 : : TypeId type = defaultType ;
bool explicitType = false ;
@ -934,7 +936,7 @@ namespace {
+ " : " + _ ( " Invalid command line " ) + " " ) ;
}
if ( typeEnd ! = std : : string : : npos ) {
if ( cmdId ! = reg & & typeEnd ! = std : : string : : npos ) {
std : : string typeStr ( line . substr ( typeStart , typeEnd - typeStart ) ) ;
Exiv2 : : TypeId tmpType = Exiv2 : : TypeInfo : : typeId ( typeStr ) ;
if ( tmpType ! = Exiv2 : : invalidTypeId ) {