summaryrefslogtreecommitdiff
path: root/src/char/int_storage.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-03-30 23:14:12 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-03-31 10:18:49 -0700
commit1a651243bb2c8e18baa9aac30ac52a62185074e7 (patch)
treedd2c0bfc448faef129fb64edec9f64d2ab12bfe5 /src/char/int_storage.cpp
parent769e8ac9c17779a15492d7fcfc1931c014670c2d (diff)
downloadtmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.gz
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.bz2
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.tar.xz
tmwa-1a651243bb2c8e18baa9aac30ac52a62185074e7.zip
Be stricter about most arrays
Diffstat (limited to 'src/char/int_storage.cpp')
-rw-r--r--src/char/int_storage.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/char/int_storage.cpp b/src/char/int_storage.cpp
index 0794c8f..d2782b4 100644
--- a/src/char/int_storage.cpp
+++ b/src/char/int_storage.cpp
@@ -83,8 +83,10 @@ bool extract(XString str, struct storage *p)
if (storage_items.size() > MAX_STORAGE)
return false;
- std::copy(storage_items.begin(), storage_items.end(), p->storage_);
+ std::copy(storage_items.begin(), storage_items.end(), p->storage_.begin());
+ if (p->storage_amount != storage_items.size())
+ PRINTF("WARNING: storage desync for %d\n", p->account_id);
return true;
}