summaryrefslogtreecommitdiff
path: root/src/map/storage.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-06-18 20:03:57 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-06-18 20:11:16 -0700
commit83db3bbee4e19e7426a32ee89ad6c2d8e48260f2 (patch)
treea6fb6f6b6acaa09d5a43cd669f87c2f7f519a521 /src/map/storage.cpp
parent8b5370313dcc00a45ea5c3e8b4c497bc00fd8e13 (diff)
downloadtmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.tar.gz
tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.tar.bz2
tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.tar.xz
tmwa-83db3bbee4e19e7426a32ee89ad6c2d8e48260f2.zip
Also poison memcpy, memmove, and memset
Diffstat (limited to 'src/map/storage.cpp')
-rw-r--r--src/map/storage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/storage.cpp b/src/map/storage.cpp
index 5145b80..54bc792 100644
--- a/src/map/storage.cpp
+++ b/src/map/storage.cpp
@@ -119,7 +119,7 @@ int storage_additem(dumb_ptr<map_session_data> sd, struct storage *stor,
if (i >= MAX_STORAGE)
return 1;
- memcpy(&stor->storage_[i], item_data, sizeof(stor->storage_[0]));
+ stor->storage_[i] = *item_data;
stor->storage_[i].amount = amount;
stor->storage_amount++;
clif_storageitemadded(sd, stor, i, amount);
@@ -143,7 +143,7 @@ int storage_delitem(dumb_ptr<map_session_data> sd, struct storage *stor,
stor->storage_[n].amount -= amount;
if (stor->storage_[n].amount == 0)
{
- memset(&stor->storage_[n], 0, sizeof(stor->storage_[0]));
+ stor->storage_[n] = item{};
stor->storage_amount--;
clif_updatestorageamount(sd, stor);
}