Skip to content

Commit e6cac2f

Browse files
authored
Merge pull request #5 from arduino-hmueller01/progmem-fix
fix progmem access crash
2 parents 1f50bcc + 45bdc27 commit e6cac2f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PubSubClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ boolean PubSubClient::publish(const char* topic, const uint8_t* payload, unsigne
472472
}
473473

474474
boolean PubSubClient::publish_P(const char* topic, const char* payload, boolean retained) {
475-
return publish_P(topic, (const uint8_t*)payload, payload ? strnlen(payload, this->bufferSize) : 0, retained);
475+
return publish_P(topic, (const uint8_t*)payload, payload ? strnlen_P(payload, this->bufferSize) : 0, retained);
476476
}
477477

478478
boolean PubSubClient::publish_P(const char* topic, const uint8_t* payload, unsigned int plength, boolean retained) {

0 commit comments

Comments
 (0)