diff --git a/src/legacy.cpp b/src/legacy.cpp index bcf9c984d..88227ac09 100644 --- a/src/legacy.cpp +++ b/src/legacy.cpp @@ -141,12 +141,14 @@ std::string legacyCheckForDeprecatedVariables () for (it = context.config.begin (); it != context.config.end (); ++it) { // report.*.limit - if (it->first.substr (0, 7) == "report." && + if (it->first.length () > 13 && + it->first.substr (0, 7) == "report." && it->first.substr (it->first.length () - 6) == ".limit") deprecated.push_back (it->first); // report.*.annotaitons - if (it->first.substr (0, 7) == "report." && + if (it->first.length () > 19 && + it->first.substr (0, 7) == "report." && it->first.substr (it->first.length () - 12) == ".annotations") deprecated.push_back (it->first);