diff --git a/examples/cpp/topic_instances/CLIParser.hpp b/examples/cpp/topic_instances/CLIParser.hpp index d77b5f1e0cc..bdd3bb9fb17 100644 --- a/examples/cpp/topic_instances/CLIParser.hpp +++ b/examples/cpp/topic_instances/CLIParser.hpp @@ -349,7 +349,7 @@ class CLIParser input == "Circle" || input == "Square" || input == "Triangle" || input == "circle" || input == "square" || input == "triangle") { - transform(input.begin(), input.begin(), input.begin(), ::toupper); + transform(input.begin(), input.begin() + 1, input.begin(), ::toupper); transform(input.begin() + 1, input.end(), input.begin() + 1, ::tolower); if (config.entity == CLIParser::EntityKind::PUBLISHER) {