From 29b5b4f7465348ce41085f58d3995cd74710796f Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Fri, 23 Feb 2024 15:14:23 +0800 Subject: [PATCH] V1.1.5 Update --- README.md | 4 ++++ library.properties | 2 +- src/zigbeeframe.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 045d805..eebf54c 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,10 @@ This library is now complete, the remaining work is mainly maintenance and bug f # Change Log +**V1.1.5 2024.2.23** + ++ Fix the bug of the pack vector may be accessed out of range. + **V1.1.4 2024.2.1** + Fix the bug of vector may be accessed out of range. diff --git a/library.properties b/library.properties index a1c2218..9a4cd07 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name= DLLN3X ZigBee Mesh Module Library -version= 1.1.4 +version= 1.1.5 author= Dylan Liu maintainer= Dylan Liu sentence= This library allows you to use DLLN3X ZigBee mesh module very easily. diff --git a/src/zigbeeframe.h b/src/zigbeeframe.h index b893608..6136295 100644 --- a/src/zigbeeframe.h +++ b/src/zigbeeframe.h @@ -131,7 +131,7 @@ public: { data.clear(); for (int i = 0; i < pack_data.size(); i++) { - if (pack_data[i] != 0xFE) { + if (pack_data[i] != 0xFE || i == pack_data.size() - 1) { data.push_back(pack_data[i]); } else if (pack_data[i + 1] == 0xFD) { data.push_back(0xFF);