changeset 3671:25b06b7222f6

[project @ 2000-05-31 20:54:50 by jwe]
author jwe
date Wed, 31 May 2000 20:54:50 +0000
parents 0287dfeb1f34
children a0952f6b163e
files src/ChangeLog src/DLD-FUNCTIONS/qz.cc
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-31  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* DLD-FUNCTIONS/qz.cc (Fqz): When computing finite generalized
+	eigenvalues, don't write past the end of the array.
+
 2000-05-11  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* ov-base-nd-array.h, ov-base-nd-array.cc, ov-re-nd-array.h,
--- a/src/DLD-FUNCTIONS/qz.cc
+++ b/src/DLD-FUNCTIONS/qz.cc
@@ -789,9 +789,10 @@
 
 	  ComplexColumnVector tmp(cnt);
 
+	  cnt = 0;
 	  for (int ii = 0; ii < nn; ii++)
 	    if (betar(ii) != 0)
-	      tmp(ii) = Complex(alphar(ii), alphai(ii))/betar(ii);
+	      tmp(cnt++) = Complex(alphar(ii), alphai(ii))/betar(ii);
 	  gev = tmp;
 	}
     }