aqhome: Fixed a bug.
This commit is contained in:
@@ -137,11 +137,11 @@ int AQH_Serial_Recv(AQH_SERIAL *sr, uint8_t *buf, int len)
|
||||
DBG_INFO(NULL, "here (%d)", rv);
|
||||
return rv;
|
||||
}
|
||||
msgLen=buf[1]+1; /* add one byte for XOR checksum */
|
||||
buf+=2;
|
||||
msgLen=buf[1];
|
||||
buf+=2; /* two bytes already read */
|
||||
|
||||
/* read message and XOR byte */
|
||||
rv=_readForced(sr, buf, msgLen);
|
||||
rv=_readForced(sr, buf, msgLen+1); /* add one byte for XOR checksum */
|
||||
if (rv<0) {
|
||||
DBG_INFO(NULL, "here (%d)", rv);
|
||||
return rv;
|
||||
|
||||
Reference in New Issue
Block a user