Mercurial > hg > octave-lyh
changeset 983:3611f5b12826
[project @ 1994-12-14 17:43:08 by jwe]
author | jwe |
---|---|
date | Wed, 14 Dec 1994 17:43:08 +0000 |
parents | db38fe433efd |
children | 6aeb8fdc27d4 |
files | src/tc-rep.cc |
diffstat | 1 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-rep.cc +++ b/src/tc-rep.cc @@ -843,17 +843,15 @@ { int len = strlen (string); - retval.resize (1, len); + if (len > 0) + { + retval.resize (1, len); - if (len > 1) - { for (int i = 0; i < len; i++) retval.elem (0, i) = toascii ((int) string[i]); } - else if (len == 1) - retval.elem (0, 0) = toascii ((int) string[0]); else - panic_impossible (); + retval = Matrix (); } else gripe_invalid_conversion ("string", "real matrix");