mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
Fix zigbee32 compile error
This commit is contained in:
parent
9cda16cc69
commit
fdec66ee01
@ -479,10 +479,12 @@ void parseSingleTuyaAttribute(Z_attribute & attr, const SBuffer &buf,
|
|||||||
attr.setUInt(buf.get32BigEndian(i));
|
attr.setUInt(buf.get32BigEndian(i));
|
||||||
break;
|
break;
|
||||||
case 0x03: // String (we expect it is not ended with \00)
|
case 0x03: // String (we expect it is not ended with \00)
|
||||||
|
{
|
||||||
char str[len+1];
|
char str[len+1];
|
||||||
strncpy(str, buf.charptr(i), len);
|
strncpy(str, buf.charptr(i), len);
|
||||||
str[len] = 0x00;
|
str[len] = 0x00;
|
||||||
attr.setStr(str);
|
attr.setStr(str);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 0x05: // enum in 1/2/4 bytes, Big Endian
|
case 0x05: // enum in 1/2/4 bytes, Big Endian
|
||||||
if (1 == len) {
|
if (1 == len) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user