From 91140dcb42f441f8883b204fdfea367c133def9e Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 23 May 2015 18:49:59 +0200 Subject: Bugfixing --- enginedata.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'enginedata.cpp') diff --git a/enginedata.cpp b/enginedata.cpp index fb60521..5cc357f 100644 --- a/enginedata.cpp +++ b/enginedata.cpp @@ -17,8 +17,14 @@ Row::Row(Row &&other):nc(other.nc),table(other.table),items(other.items){ //move other.items=nullptr; } Row::Row(const Row &other):nc(other.nc),table(other.table){ //copy constr - items=new RowItem[table->nc]; - memcpy(items,other.items,table->nc*sizeof(RowItem)); + items=new RowItem[nc]; + memcpy(items,other.items,nc*sizeof(RowItem)); + for(int i=0;iheader[i].type==RH_BYTES){ + items[i].rh_bytes=new unsigned char[table->header[i].arg]; + memcpy(items[i].rh_bytes,other.items[i].rh_bytes,table->header[i].arg); + } + } } ostream& operator<<(ostream &os,const Row &r){ os<<'['; -- cgit v1.2.3-70-g09d2