mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 22:45:55 -04:00
adding fix for crash when using effects with kasa devices
This commit is contained in:
@@ -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 |
|
||||
\*-------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user