summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player.cc
diff options
context:
space:
mode:
authorSteven Noonan <steven@uplinklabs.net>2009-12-12 16:11:59 -0800
committerSteven Noonan <steven@uplinklabs.net>2009-12-12 16:11:59 -0800
commite86c5d67d5ee5d0a73d74eea90d25fa84cce2ca3 (patch)
tree9fb3dd4d33e05a73af08224b20242bbfe86bce74 /crawl-ref/source/player.cc
parent14bfaca7e0b40811a7e7a3bb5ebe1ac952dbbbb7 (diff)
downloadcrawl-ref-e86c5d67d5ee5d0a73d74eea90d25fa84cce2ca3.tar.gz
crawl-ref-e86c5d67d5ee5d0a73d74eea90d25fa84cce2ca3.zip
player.{cc,h}: fix copy constructor for dolls_data struct
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/player.cc')
-rw-r--r--crawl-ref/source/player.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index cc1b2f1fd7..0e5935cc9e 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -80,6 +80,12 @@ dolls_data::dolls_data()
memset(parts, 0, TILEP_PART_MAX * sizeof(int));
}
+dolls_data::dolls_data(dolls_data const &_orig)
+{
+ parts = new int[TILEP_PART_MAX];
+ memcpy(parts, _orig.parts, TILEP_PART_MAX * sizeof(int));
+}
+
dolls_data::~dolls_data()
{
delete [] parts;