Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian-Nordic committed Jan 2, 2023
1 parent c857ff4 commit 09097b0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/darwin/Framework/CHIP/MTRBaseDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ + (id)CHIPEncodeAndDecodeNSObject:(id)object
uint8_t buffer[1024];
writer.Init(buffer, sizeof(buffer));

CHIP_ERROR error = originalData.Encode(writer, chip::TLV::Tag(1));
CHIP_ERROR error = originalData.Encode(writer, chip::TLV::CommonTag(1));
if (error != CHIP_NO_ERROR) {
MTR_LOG_ERROR("Error: Data encoding failed: %s", error.AsString());
return nil;
Expand All @@ -1456,8 +1456,9 @@ + (id)CHIPEncodeAndDecodeNSObject:(id)object
return nil;
}
__auto_type tag = reader.GetTag();
if (tag != chip::TLV::Tag(1)) {
MTR_LOG_ERROR("Error: TLV reader did not read the tag correctly: %llu", tag.mVal);
if (tag != chip::TLV::CommonTag(1)) {
MTR_LOG_ERROR("Error: TLV reader did not read the tag correctly: %x.%u", chip::TLV::ProfileIdFromTag(tag),
chip::TLV::TagNumFromTag(tag));
return nil;
}
MTRDataValueDictionaryDecodableType decodedData;
Expand Down

0 comments on commit 09097b0

Please sign in to comment.