diff src/ls-mat5.cc @ 5058:11bea7392e69

[project @ 2004-11-01 21:06:44 by jwe]
author jwe
date Mon, 01 Nov 2004 21:06:44 +0000
parents 44046bbaa52c
children 3db2b2762491
line wrap: on
line diff
--- a/src/ls-mat5.cc
+++ b/src/ls-mat5.cc
@@ -889,13 +889,14 @@
 
 	int len = m.numel ();
 
-	for (Octave_map::const_iterator i = m.begin (); i != m.end (); i++)
+	for (int j = 0; j < len; j++)
 	  {
 	    // write the data of each element
-	    Cell elts = m.contents (i);
 
-	    for (int j = 0; j < len; j++)
+	    for (Octave_map::const_iterator i = m.begin (); i != m.end (); i++)
 	      {
+		Cell elts = m.contents (i);
+
 		bool retval2 = save_mat5_binary_element (os, elts(j), "",
 							 mark_as_global,
 							 save_as_floats);