From 6fd972d7a80dd5a3f23836e98987265b8b11fe2c Mon Sep 17 00:00:00 2001 From: Charles Date: Sat, 13 Jun 2020 02:18:01 +0200 Subject: [PATCH] Bumped to version 1.1.1 --- lib/LibTeleinfo/library.json | 2 +- lib/LibTeleinfo/library.properties | 2 +- lib/LibTeleinfo/src/LibTeleinfo.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/LibTeleinfo/library.json b/lib/LibTeleinfo/library.json index 068618ce0..70f368653 100755 --- a/lib/LibTeleinfo/library.json +++ b/lib/LibTeleinfo/library.json @@ -1,6 +1,6 @@ { "name": "LibTeleinfo", - "version": "1.1.0", + "version": "1.1.1", "keywords": "teleinfo, french, meter, power, erdf, linky, tic", "description": "Decoder for Teleinfo (aka TIC) from French smart power meters", "repository": diff --git a/lib/LibTeleinfo/library.properties b/lib/LibTeleinfo/library.properties index 2420c5fc2..fdcee4a25 100755 --- a/lib/LibTeleinfo/library.properties +++ b/lib/LibTeleinfo/library.properties @@ -1,5 +1,5 @@ name=LibTeleinfo -version=1.1.0 +version=1.1.1 author=Charles-Henri Hallard maintainer=Charles-Henri Hallard sentence=Decoder for Teleinfo (aka TIC) from French smart power meters diff --git a/lib/LibTeleinfo/src/LibTeleinfo.cpp b/lib/LibTeleinfo/src/LibTeleinfo.cpp index 77db56e54..8d34e89d1 100644 --- a/lib/LibTeleinfo/src/LibTeleinfo.cpp +++ b/lib/LibTeleinfo/src/LibTeleinfo.cpp @@ -212,9 +212,9 @@ ValueList * TInfo::valueAdd(char * name, char * value, uint8_t checksum, uint8_t me = me->next; // Check if we already have this LABEL (same name AND same size) - if (lgname==strlen(me->name) && strncmp(me->name, name, lgname)==0) { + if (lgname==strlen(me->name) && strcmp(me->name, name)==0) { // Already got also this value return US - if (lgvalue==strlen(me->value) && strncmp(me->value, value, lgvalue) == 0) { + if (lgvalue==strlen(me->value) && strcmp(me->value, value) == 0) { *flags |= TINFO_FLAGS_EXIST; me->flags = *flags; return ( me ); @@ -225,7 +225,7 @@ ValueList * TInfo::valueAdd(char * name, char * value, uint8_t checksum, uint8_t // Do we have enought space to hold new value ? if (strlen(me->value) >= lgvalue ) { // Copy it - strlcpy(me->value, value , lgvalue ); + strlcpy(me->value, value , lgvalue + 1 ); me->checksum = checksum ; // That's all