Added a wrapper for U16toU8, called AUTOU16TOU8

- U16toU8 now requires a max arument to be passed
This commit is contained in:
2021-03-17 23:41:47 -05:00
parent 610a683804
commit 574f0cab09
9 changed files with 43 additions and 38 deletions

View File

@@ -289,10 +289,10 @@ static void emailSend(CNSocket* sock, CNPacketData* data) {
0, // ReadFlag (unread)
(pkt->iCash > 0 || attachments.size() > 0) ? 1 : 0, // ItemFlag
plr->iID, // SenderID
U16toU8(plr->PCStyle.szFirstName), // SenderFirstName
U16toU8(plr->PCStyle.szLastName), // SenderLastName
Chat::sanitizeText(U16toU8(pkt->szSubject)), // SubjectLine
Chat::sanitizeText(U16toU8(pkt->szContent), true), // MsgBody
AUTOU16TOU8(plr->PCStyle.szFirstName), // SenderFirstName
AUTOU16TOU8(plr->PCStyle.szLastName), // SenderLastName
Chat::sanitizeText(AUTOU16TOU8(pkt->szSubject)), // SubjectLine
Chat::sanitizeText(AUTOU16TOU8(pkt->szContent), true), // MsgBody
pkt->iCash, // Taros
(uint64_t)getTimestamp(), // SendTime
0 // DeleteTime (unimplemented)