Fix #561. Use proper counter for the idx variable

v0.27.3
Luis Díaz Más 7 years ago
parent dc04cc92eb
commit 6e42c1b55e

@ -154,7 +154,7 @@ namespace Exiv2 {
std::ostringstream os; std::ostringstream os;
md_st->write(os, &ed); md_st->write(os, &ed);
bool ok = false; bool ok = false;
long st_val = parseLong(os.str(), ok); const long st_val = parseLong(os.str(), ok);
// SensivityType out of range or cannot be parsed properly // SensivityType out of range or cannot be parsed properly
if (!ok || st_val < 1 || st_val > 7) if (!ok || st_val < 1 || st_val > 7)
break; break;
@ -175,7 +175,7 @@ namespace Exiv2 {
md = md_st; md = md_st;
break; break;
} }
while (strcmp(sensKeys->keys[idx++], md_st->key().c_str()) != 0 && idx < cnt) {} while (strcmp(sensKeys->keys[idx++], md_st->key().c_str()) != 0 && idx < sensKeys->count) {}
} }
break; break;
} }

Loading…
Cancel
Save