Skip to content

Commit

Permalink
[Ameba] Fix Trailing Null (#23485)
Browse files Browse the repository at this point in the history
* TC-BINFO-2.1 when reading location, it shows 3 chars. Remove trailing null after getPref_str_new
  • Loading branch information
pankore authored Nov 10, 2022
1 parent cbfb908 commit 4744889
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platform/Ameba/AmebaConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ CHIP_ERROR AmebaConfig::ReadConfigValueStr(Key key, char * buf, size_t bufSize,

if (success == 0)
{
outLen -= 1; // Don't count trailing null
return CHIP_NO_ERROR;
}
else
Expand Down

0 comments on commit 4744889

Please sign in to comment.