Merge pull request #82 from e-lin/master

Match the length of type for writing data
This commit is contained in:
Nick O'Leary 2015-10-04 19:35:29 +01:00
commit efebd2e5e4

View File

@ -428,7 +428,7 @@ boolean PubSubClient::write(uint8_t header, uint8_t* buf, uint16_t length) {
#ifdef MQTT_MAX_TRANSFER_SIZE
uint8_t* writeBuf = buf+(4-llen);
uint8_t bytesRemaining = length+1+llen;
uint16_t bytesRemaining = length+1+llen; //Match the length type
uint8_t bytesToWrite;
boolean result = true;
while((bytesRemaining > 0) && result) {