Mercurial > hg > octave-nkf
changeset 4306:6d3df3900252
[project @ 2003-01-24 04:21:58 by jwe]
author | jwe |
---|---|
date | Fri, 24 Jan 2003 04:21:58 +0000 |
parents | 98e65d1728a1 |
children | fd034cd46aea |
files | liboctave/Array2-idx.h liboctave/ChangeLog |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/Array2-idx.h +++ b/liboctave/Array2-idx.h @@ -128,15 +128,13 @@ retval.resize (result_nr, result_nc); - - int k = 0; for (int j = 0; j < result_nc; j++) { for (int i = 0; i < result_nr; i++) { int ii = idx_arg.elem (k++); - if (ii > orig_len) + if (ii >= orig_len) retval.elem (i, j) = resize_fill_value; else { @@ -189,7 +187,7 @@ for (int i = 0; i < n; i++) { int ii = idx_i.elem (i); - if (ii > nr || jj > nc) + if (ii >= nr || jj >= nc) retval.elem (i, j) = resize_fill_value; else retval.elem (i, j) = elem (ii, jj);
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,7 @@ +2003-01-23 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array2-idx.h (Array2<T>::index): Fix off-by-one error. + 2003-01-16 Mumit Khan <khan@nanotech.wisc.edu> * oct-syscalls.cc: Include signal.h. @@ -45,8 +49,8 @@ * Makefile.in (distclean): Also remove stamp-prereq. - * Array2-idx.h (assign): If assignment conforms but the RHS and - index are empty matrices, don't do anything. + * Array2-idx.h (Array2<T>::assign): If assignment conforms but the + RHS and index are empty matrices, don't do anything. 2002-12-26 John W. Eaton <jwe@bevo.che.wisc.edu>