adding fix for crash when using effects with kasa devices
This commit is contained in:
parent
b1d5e83adc
commit
48f0084a9f
1 changed files with 1 additions and 1 deletions
|
|
@ -314,7 +314,7 @@ bool KasaSmartController::SendCommand(std::string command, std::string &response
|
|||
|
||||
unsigned char* receive_buffer = new unsigned char[KASA_SMART_RECEIVE_BUFFER_SIZE];
|
||||
int response_length = port.tcp_listen((char*)receive_buffer, KASA_SMART_RECEIVE_BUFFER_SIZE);
|
||||
if(response_length > KASA_SMART_RECEIVE_BUFFER_SIZE) {
|
||||
if(response_length > KASA_SMART_RECEIVE_BUFFER_SIZE || response_length <= 0) {
|
||||
/*-------------------------------------------------------------*\
|
||||
| Small fail safes to prevent decrypting bad or empty responses |
|
||||
\*-------------------------------------------------------------*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue