Mercurial > hg > octave-terminal
changeset 3264:973c81fbe144
[project @ 1999-09-02 17:47:15 by jwe]
author | jwe |
---|---|
date | Thu, 02 Sep 1999 17:47:17 +0000 |
parents | 7d80b56e0dc8 |
children | a2b3a1413d28 |
files | src/ChangeLog src/oct-obj.cc |
diffstat | 2 files changed, 13 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +Thu Sep 2 11:54:51 1999 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-obj.cc (make_argv): Correctly handle empty strings as args. + Fri Aug 20 08:17:52 1999 John W. Eaton <jwe@bevo.che.wisc.edu> * DLD-FUNCTIONS/quad.cc (quad): Delete unused label.
--- 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 {