Mercurial > hg > octave-nkf
diff src/oct-obj.cc @ 3264:973c81fbe144
[project @ 1999-09-02 17:47:15 by jwe]
author | jwe |
---|---|
date | Thu, 02 Sep 1999 17:47:17 +0000 |
parents | 30770ba4457a |
children | b80bbb43a1a9 |
line wrap: on
line diff
--- a/src/oct-obj.cc +++ b/src/oct-obj.cc @@ -166,7 +166,14 @@ int total_nr = 0; for (int i = 0; i < len; i++) - total_nr += elem(i).rows (); + { + // An empty string ("") has zero columns and zero rows (a + // change that was made for Matlab contemptibility. + + int n = elem(i).rows (); + + total_nr += n ? n : 1; + } argv.resize (total_nr+1); @@ -177,7 +184,7 @@ { int nr = elem(i).rows (); - if (nr == 1) + if (nr < 2) argv[k++] = elem(i).string_value (); else {