From ce357cc004ab5d0c20f90ede713ae84929bbb7f7 Mon Sep 17 00:00:00 2001 From: Stefan Giehl Date: Wed, 29 Sep 2021 00:09:34 +0200 Subject: [PATCH] [Luxtronik] Fix possible out ouf bound error for older heatpumps (#11318) * [Luxtronik] Fix possible out ouf bound error for older heatpumps Signed-off-by: Stefan Giehl * fix typo Signed-off-by: Stefan Giehl Signed-off-by: Dave J Schoepel --- .../binding/luxtronikheatpump/internal/HeatpumpConnector.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/HeatpumpConnector.java b/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/HeatpumpConnector.java index a3ed82e643361..1cfd739a2bab7 100644 --- a/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/HeatpumpConnector.java +++ b/bundles/org.openhab.binding.luxtronikheatpump/src/main/java/org/openhab/binding/luxtronikheatpump/internal/HeatpumpConnector.java @@ -71,7 +71,7 @@ public void read() throws UnknownHostException, IOException { // the thermal energies can be unreasonably high in some cases, probably due to a sign bug in the firmware // trying to correct this issue here for (int i = 151; i <= 154; i++) { - if (heatpumpValues[i] >= 214748364) { + if (heatpumpValues.length > i && heatpumpValues[i] >= 214748364) { heatpumpValues[i] -= 214748364; } }