Skip to content

Commit

Permalink
Update lib_NDEF_Wifi.cpp
Browse files Browse the repository at this point in the history
Signed-off-by: Carlo Parata <[email protected]>
  • Loading branch information
cparata committed Jun 11, 2024
1 parent a95f8c5 commit 5feee34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libNDEF/lib_NDEF_Wifi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void NDEF::NDEF_FillWifiTokenStruct(uint8_t *pPayload, uint32_t PayloadSize, sWi
SSIDLen |= data2;
pPayload += 4;
memcpy(pWifiTokenStruct->NetworkSSID, pPayload, SSIDLen);
/* add end of string charactere */
/* add end of string character */
pWifiTokenStruct->NetworkSSID[SSIDLen] = '\0';
pPayload += SSIDLen - 1;
} else if (dbg1 == ATTRIBUTE_ID_NETWORK_MSB) {
Expand All @@ -141,7 +141,7 @@ void NDEF::NDEF_FillWifiTokenStruct(uint8_t *pPayload, uint32_t PayloadSize, sWi
NetWorkKeyLen |= data2;
pPayload += 4;
memcpy(pWifiTokenStruct->NetworkKey, pPayload, NetWorkKeyLen);
/* add end of string charactere */
/* add end of string character */
pWifiTokenStruct->NetworkKey[NetWorkKeyLen] = '\0';
pPayload += NetWorkKeyLen - 1;
} else {
Expand Down

0 comments on commit 5feee34

Please sign in to comment.