fix: teleinfo standard mode crash (#23628)

This commit is contained in:
Routmoute 2025-07-02 08:44:03 +02:00 committed by GitHub
parent 143cfdd4f2
commit 4904a43b33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -454,13 +454,13 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
// Contract subscribed (standard is in clear text in value) // Contract subscribed (standard is in clear text in value)
else if (ilabel == LABEL_NGTF) else if (ilabel == LABEL_NGTF)
{ {
if (strstr(me->value, TELEINFO_STD_CONTRACT_BASE)) { if (strstr_P(me->value, TELEINFO_STD_CONTRACT_BASE)) {
contrat = CONTRAT_BAS; contrat = CONTRAT_BAS;
} else if (strstr(me->value, TELEINFO_STD_CONTRACT_HCHP)) { } else if (strstr_P(me->value, TELEINFO_STD_CONTRACT_HCHP)) {
contrat = CONTRAT_HC; contrat = CONTRAT_HC;
} else if (strstr(me->value, TELEINFO_STD_CONTRACT_BBR)) { } else if (strstr_P(me->value, TELEINFO_STD_CONTRACT_BBR)) {
contrat = CONTRAT_BBR; contrat = CONTRAT_BBR;
} else if (strstr(me->value, TELEINFO_STD_CONTRACT_EJP)) { } else if (strstr_P(me->value, TELEINFO_STD_CONTRACT_EJP)) {
contrat = CONTRAT_EJP; contrat = CONTRAT_EJP;
} }