val.ptr pointer, rather than copying the object that the pointer referenced; this could potentially lead to freed memory being referenced or to memory being freed twice. This will hopefully fix some CrawlStore related assertions caused by randarts.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3015 c06c8d41-db1a-0410-9941-cceddc491573
NUEPUFFFIEILCZCNNNANHPKCDKHOLMJE5RCNTK475SCEBTBHBUUAC
// Only needed to do some assertion checking.
#define COPY_PTR(ptr_type) \
{ \
ptr_type *ptr = static_cast<ptr_type*>(val.ptr); \
if (ptr != NULL) \
delete ptr; \
ptr = static_cast<ptr_type*>(other.val.ptr); \
val.ptr = (void*) new ptr_type (*ptr); \
}