Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
etorth committed Jan 14, 2025
1 parent c5d1b56 commit 9cc6269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/npchar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ std::string NPChar::AESHelper::decode(const char *s)
{
auto buf = base64f::decode(to_sv(s));
decrypt(buf);

while(!(buf.empty() || buf.back() != '\0')){
buf.pop_back();
}
return buf;
}

Expand Down
1 change: 1 addition & 0 deletions server/src/npcharop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ void NPChar::on_AM_NPCEVENT(const ActorMsgPack &mpk)

if(!sdNPCE.event.empty() && sdNPCE.event != SYS_ENTER){
sdNPCE.event = AESHelper(this, mpk.from()).decode(sdNPCE.event.c_str());
m_xmlLayoutSeqIDList.erase(mpk.from());
}

// when CO initially sends a message to NPC, we assume its UID is the callStackUID
Expand Down

0 comments on commit 9cc6269

Please sign in to comment.