Skip to content

Commit

Permalink
fix: add support for symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
DeimosHall committed Dec 29, 2023
1 parent 9b05cb1 commit f5a2105
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/NDEFSendMessage/NDEFSendMessage.ino
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void setup() {
String encryptionType = "AES";
String password = "Password";
message.addWiFiRecord(ssid, authentificationType, encryptionType, password);
// message.addUriRecord("mailto:deimoshallgmail.com"); // TODO: check @ problem
message.addUriRecord("mailto:deimoshall@gmail.com");
nfc.setSendMsgCallback(messageSentCallback);

Serial.println("Initializing...");
Expand Down
5 changes: 3 additions & 2 deletions src/NdefRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,11 @@ void NdefRecord::setPayload(String payload) {
#endif

this->payload = new unsigned char[payload.length()];
strcpy((char *)this->payload, payload.c_str());
strncpy((char *)this->payload, payload.c_str(), payload.length());

#ifdef DEBUG3
// Serial.println("Payload: '" + getHexRepresentation(this->payload, length) + "'");
Serial.println("Payload length: " + String(length));
Serial.println("Payload: '" + getHexRepresentation(this->payload, length) + "'");
#endif
}

Expand Down

0 comments on commit f5a2105

Please sign in to comment.