From 2e7f76aea16538b1bc2a14b8b3411b9d40214114 Mon Sep 17 00:00:00 2001 From: trabus322 Date: Tue, 19 Mar 2024 20:48:19 +0100 Subject: [PATCH] Added a small protection --- src/hoymiles/port.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hoymiles/port.cpp b/src/hoymiles/port.cpp index 71405a6..298d4ae 100644 --- a/src/hoymiles/port.cpp +++ b/src/hoymiles/port.cpp @@ -56,6 +56,9 @@ void Port::fixCurrent() { if(this->currentFixed) { return; } + if(this->parameters.size() < 8) { + return; + } if(this->parameters.at(7).get()->getValue().first.f == 0) { return; }