Skip to content

Commit

Permalink
Fix CHIPClusters template for encoding CHAR_STRING. (#11661)
Browse files Browse the repository at this point in the history
We are grabbing the pointer from the Span and ignoring the length; we should just encode the Span
as-is.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Sep 27, 2022
1 parent 83ffd03 commit 4377520
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/app/zap-templates/templates/app/CHIPClusters-src.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CHIP_ERROR {{asUpperCamelCase clusterName}}Cluster::{{asUpperCamelCase name}}(Ca
{{/first}}
// {{asLowerCamelCase label}}: {{asLowerCamelCase type}}
{{#if (isCharString type)}}
SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), {{asLowerCamelCase label}}.data()));
SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), {{asLowerCamelCase label}}));
{{else}}
SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), {{asLowerCamelCase label}}));
{{/if}}
Expand Down
40 changes: 20 additions & 20 deletions zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions zzz_generated/tv-app/zap-generated/CHIPClusters.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4377520

Please sign in to comment.