Skip to content

Commit 70ac059

Browse files
author
张钦
committed
Fix the problem of invalid judgment in the command ChangeConfigurationConf. Here, value.find should be used to obtain the issued data.
1 parent 53e05e1 commit 70ac059

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/common/config/OcppConfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ ocpp::types::ConfigurationStatus OcppConfig::setConfiguration(const std::string&
200200
std::size_t key_is_interval = key.find("Interval");
201201
if (key_is_interval != std::string::npos)
202202
{
203-
std::size_t value_is_negative = key.find("-");
204-
if (value_is_negative)
203+
std::size_t value_is_negative = value.find("-");
204+
if (value_is_negative != std::string::npos)
205205
{
206206
ret = ConfigurationStatus::Rejected;
207207
}

0 commit comments

Comments
 (0)