std::strncpy back to strlcpy
This commit is contained in:
@@ -151,7 +151,7 @@ void CItem::EncodeInsertPacket(LPENTITY ent)
|
||||
|
||||
p.bHeader = HEADER_GC_ITEM_OWNERSHIP;
|
||||
p.dwVID = m_dwVID;
|
||||
std::strncpy(p.szName, info->szOwnerName, sizeof(p.szName));
|
||||
strlcpy(p.szName, info->szOwnerName, sizeof(p.szName));
|
||||
|
||||
d->Packet(&p, sizeof(TPacketGCItemOwnership));
|
||||
}
|
||||
@@ -1147,7 +1147,7 @@ void CItem::SetOwnership(LPCHARACTER ch, int iSec)
|
||||
m_dwOwnershipPID = ch->GetPlayerID();
|
||||
|
||||
item_event_info* info = AllocEventInfo<item_event_info>();
|
||||
std::strncpy(info->szOwnerName, ch->GetName(), sizeof(info->szOwnerName));
|
||||
strlcpy(info->szOwnerName, ch->GetName(), sizeof(info->szOwnerName));
|
||||
info->item = this;
|
||||
|
||||
SetOwnershipEvent(event_create(ownership_event, info, PASSES_PER_SEC(iSec)));
|
||||
@@ -1156,7 +1156,7 @@ void CItem::SetOwnership(LPCHARACTER ch, int iSec)
|
||||
|
||||
p.bHeader = HEADER_GC_ITEM_OWNERSHIP;
|
||||
p.dwVID = m_dwVID;
|
||||
std::strncpy(p.szName, ch->GetName(), sizeof(p.szName));
|
||||
strlcpy(p.szName, ch->GetName(), sizeof(p.szName));
|
||||
|
||||
PacketAround(&p, sizeof(p));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user