Index: /trunk/psLib/src/math/psMatrix.c
===================================================================
--- /trunk/psLib/src/math/psMatrix.c	(revision 15823)
+++ /trunk/psLib/src/math/psMatrix.c	(revision 15824)
@@ -22,6 +22,6 @@
  *  @author Andy Becker, University of Washington (SVD).
  *
- *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-12-14 02:46:45 $
+ *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-12-14 02:49:44 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -363,11 +363,14 @@
         return false;
     }
-    b = psMatrixLUSolve(b, lu, b, perm);
+    psVector *ans = psMatrixLUSolve(NULL, lu, b, perm); // Answer
     psFree(lu);
     psFree(perm);
-    if (!b) {
+    if (!ans) {
         psError(PS_ERR_UNKNOWN, false, "Unable to solve matrix equation.");
         return false;
     }
+
+    memcpy(b->data.U8, ans->data.U8, b->n * PSELEMTYPE_SIZEOF(ans->type.type));
+    psFree(ans);
 
     return true;
