Skip to content

Commit 974f4b8

Browse files
authored
Merge pull request #95 from fpistm/min_STL
Fix min() usage when using STL C++
2 parents 786ca3f + ce9bcab commit 974f4b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_MQTT_Client.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ bool Adafruit_MQTT_Client::sendPacket(uint8_t *buffer, uint16_t len) {
8181
if (client->connected()) {
8282
// send 250 bytes at most at a time, can adjust this later based on Client
8383

84-
uint16_t sendlen = min(len, 250);
84+
uint16_t sendlen = min(len, (uint16_t)250);
8585
//Serial.print("Sending: "); Serial.println(sendlen);
8686
ret = client->write(buffer, sendlen);
8787
DEBUG_PRINT(F("Client sendPacket returned: ")); DEBUG_PRINTLN(ret);

0 commit comments

Comments
 (0)