[rkward-cvs] rkward/rkward/core rkvariable.cpp,1.35,1.36

Thomas Friedrichsmeier tfry at users.sourceforge.net
Wed Aug 16 14:16:46 UTC 2006


Update of /cvsroot/rkward/rkward/rkward/core
In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv31008

Modified Files:
	rkvariable.cpp 
Log Message:
fix stupid memmove miscalculation

Index: rkvariable.cpp
===================================================================
RCS file: /cvsroot/rkward/rkward/rkward/core/rkvariable.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** rkvariable.cpp	22 Jun 2006 18:57:18 -0000	1.35
--- rkvariable.cpp	16 Aug 2006 14:16:44 -0000	1.36
***************
*** 396,400 ****
  	if (myData ()->cell_string_data) {		// not starting from 0
  		qmemmove (new_string_data, myData ()->cell_string_data, myData ()->allocated_length * sizeof (char*));
! 		qmemmove (new_double_data, myData ()->cell_double_data, myData ()->allocated_length * sizeof (double*));
  	
  		delete [] (myData ()->cell_string_data);
--- 396,400 ----
  	if (myData ()->cell_string_data) {		// not starting from 0
  		qmemmove (new_string_data, myData ()->cell_string_data, myData ()->allocated_length * sizeof (char*));
! 		qmemmove (new_double_data, myData ()->cell_double_data, myData ()->allocated_length * sizeof (double));
  	
  		delete [] (myData ()->cell_string_data);
***************
*** 680,684 ****
  	if (to_row < (myData ()->allocated_length - 1)) {	// not the last rows
  		qmemmove (&(myData ()->cell_string_data[from_row]), &(myData ()->cell_string_data[to_row+1]), (myData ()->allocated_length - to_row - 1) * sizeof (char*));
! 		qmemmove (&(myData ()->cell_double_data[from_row]), &(myData ()->cell_double_data[to_row+1]), (myData ()->allocated_length - to_row - 1) * sizeof (double*));
  	}
  
--- 680,684 ----
  	if (to_row < (myData ()->allocated_length - 1)) {	// not the last rows
  		qmemmove (&(myData ()->cell_string_data[from_row]), &(myData ()->cell_string_data[to_row+1]), (myData ()->allocated_length - to_row - 1) * sizeof (char*));
! 		qmemmove (&(myData ()->cell_double_data[from_row]), &(myData ()->cell_double_data[to_row+1]), (myData ()->allocated_length - to_row - 1) * sizeof (double));
  	}
  





More information about the rkward-tracker mailing list