changeset 6224:d86ea52f5f43

[project @ 2007-01-04 17:57:48 by jwe]
author jwe
date Thu, 04 Jan 2007 17:57:49 +0000
parents a6cc01dd09f9
children 62f482479cb5
files src/ChangeLog src/mex.cc
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Jan 03 20:59:28 2007 +0000
+++ b/src/ChangeLog	Thu Jan 04 17:57:49 2007 +0000
@@ -1,3 +1,8 @@
+2007-01-04  Luis F. Ortiz  <lortiz@interactivesupercomputing.com>
+
+	* mex.cc (mxArray_number::mxArray_number (int, const char **)):
+	Correctly index LHS in assignment.
+
 2007-01-03  John W. Eaton  <jwe@octave.org>
 
 	* data.cc (Fisinteger): New function.
--- a/src/mex.cc	Wed Jan 03 20:59:28 2007 +0000
+++ b/src/mex.cc	Thu Jan 04 17:57:49 2007 +0000
@@ -1124,10 +1124,10 @@
 	int tmp_len = strlen (ptr);
 
 	for (int i = 0; i < tmp_len; i++)
-	  cpr[i] = static_cast<mxChar> (ptr[i]);
+	  cpr[m*i+j] = static_cast<mxChar> (ptr[i]);
 
 	for (int i = tmp_len; i < nc; i++)
-	  cpr[i] = static_cast<mxChar> (' ');
+	  cpr[m*i+j] = static_cast<mxChar> (' ');
       }	
   }