diff --git a/src/futils.cpp b/src/futils.cpp index 67c910ac..d55fcb6b 100644 --- a/src/futils.cpp +++ b/src/futils.cpp @@ -275,7 +275,7 @@ namespace Exiv2 { , { "-" ,pStdin , false } }; for ( size_t i = 0 ; result == pFile && i < sizeof(prots)/sizeof(prots[0]) ; i ++ ) - if ( path.find(prots[i].name) == 0 ) + if ( path.rfind(prots[i].name, 0) == 0 ) // URL's require data. Stdin == "-" and no further data if ( prots[i].isUrl ? path.size() > prots[i].name.size() : path.size() == prots[i].name.size() ) result = prots[i].prot; @@ -300,7 +300,7 @@ namespace Exiv2 { , { L"-" ,pStdin , false } }; for ( size_t i = 0 ; result == pFile && i < sizeof(prots)/sizeof(prots[0]) ; i ++ ) - if ( path.find(prots[i].name) == 0 ) + if ( path.rfind(prots[i].name, 0) == 0 ) // URL's require data. Stdin == "-" and no further data if ( prots[i].isUrl ? path.size() > prots[i].name.size() : path.size() == prots[i].name.size() ) result = prots[i].prot; diff --git a/src/jpgimage.cpp b/src/jpgimage.cpp index b9e724c1..66b61faa 100644 --- a/src/jpgimage.cpp +++ b/src/jpgimage.cpp @@ -665,7 +665,7 @@ namespace Exiv2 { // 2 | 0xe1 APP1 | 911 | Exif..MM.*.......%.........#.... // 915 | 0xe1 APP1 | 870 | http://ns.adobe.com/xap/1.0/. 0) { io_->seek(-bufRead, BasicIo::cur); diff --git a/src/pentaxmn_int.cpp b/src/pentaxmn_int.cpp index de1ba757..128df3c3 100644 --- a/src/pentaxmn_int.cpp +++ b/src/pentaxmn_int.cpp @@ -1316,7 +1316,7 @@ namespace Exiv2 { ; if ( value.count() == 4 ) { std::string model = getKeyString("Exif.Image.Model" ,metadata); - if ( model.find("PENTAX K-3")==0 && lensInfo->count() == 128 && lensInfo->toLong(1) == 168 && lensInfo->toLong(2) == 144 ) index = 7; + if ( model.rfind("PENTAX K-3", 0)==0 && lensInfo->count() == 128 && lensInfo->toLong(1) == 168 && lensInfo->toLong(2) == 144 ) index = 7; } if ( index > 0 ) { @@ -1344,14 +1344,14 @@ namespace Exiv2 { ; if ( value.count() == 4 ) { std::string model = getKeyString("Exif.Image.Model" ,metadata); - if ( model.find("PENTAX K-3")==0 && lensInfo->count() == 128 && lensInfo->toLong(1) == 131 && lensInfo->toLong(2) == 128 ) + if ( model.rfind("PENTAX K-3", 0)==0 && lensInfo->count() == 128 && lensInfo->toLong(1) == 131 && lensInfo->toLong(2) == 128 ) index = 6; } if ( value.count() == 2 ) { std::string model = getKeyString("Exif.Image.Model" ,metadata); - if ( model.find("PENTAX K100D")==0 && lensInfo->count() == 44 ) + if ( model.rfind("PENTAX K100D", 0)==0 && lensInfo->count() == 44 ) index = 6; - if ( model.find("PENTAX *ist DL")==0 && lensInfo->count() == 36 ) + if ( model.rfind("PENTAX *ist DL", 0)==0 && lensInfo->count() == 36 ) index = 6; }