Mercurial > octave-nkf
changeset 14012:4faef552363d
charMatrix::row_as_string: return early if r is 0 and either nr or nc is 0
* chMatrix.cc (charMatrix::row_as_string): Return early if r is 0 and
either nr or nc is 0, not if all are 0.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 08 Dec 2011 00:49:51 -0500 |
parents | 431c6b00653d |
children | 1734ebe27134 |
files | liboctave/chMatrix.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/chMatrix.cc Wed Dec 07 19:58:51 2011 -0500 +++ b/liboctave/chMatrix.cc Thu Dec 08 00:49:51 2011 -0500 @@ -137,7 +137,7 @@ octave_idx_type nr = rows (); octave_idx_type nc = cols (); - if (r == 0 && nr == 0 && nc == 0) + if (r == 0 && (nr == 0 || nc == 0)) return retval; if (r < 0 || r >= nr)