diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-11-29 02:30:20 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-11-29 02:30:20 +0300 |
commit | 69596fa400a09f476bac75c5ec0d2587d56dc18b (patch) | |
tree | 582d39a400ed85756f5205ae9284761368199b45 /src/p18 | |
parent | 0d7e12ce55d1ff4f303b37fb89fc01fad5dfb8cf (diff) |
p18: fix serial number parsing in get-p-rated
Diffstat (limited to 'src/p18')
-rw-r--r-- | src/p18/response.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/p18/response.cc b/src/p18/response.cc index 0239b2d..453272c 100644 --- a/src/p18/response.cc +++ b/src/p18/response.cc @@ -658,7 +658,7 @@ void ParallelRatedInformation::unpack() { parallel_id_connection_status = static_cast<ParallelConnectionStatus>(stou(list[0])); serial_number_valid_length = stou(list[1]); - serial_number = std::string(list[2], serial_number_valid_length); + serial_number = std::string(list[2], 0, serial_number_valid_length); charger_source_priority = static_cast<ChargerSourcePriority>(stou(list[3])); max_charging_current = stou(list[4]); max_ac_charging_current = stou(list[5]); |