Mercurial > octave
changeset 848:e21e192c9f87
[project @ 1994-10-20 21:55:39 by jwe]
author | jwe |
---|---|
date | Thu, 20 Oct 1994 21:55:39 +0000 |
parents | e003ab4b6ff0 |
children | 24526a179c66 |
files | src/tc-rep-idx.cc |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-rep-idx.cc Thu Oct 20 21:42:15 1994 +0000 +++ b/src/tc-rep-idx.cc Thu Oct 20 21:55:39 1994 +0000 @@ -489,7 +489,13 @@ idx_vector iv (mi, 1, "", len); if (! iv) - return tree_constant (); + return retval; + + if (iv.max () >= nr * nc || iv.min () < 0) + { + error ("matrix index out of range"); + return retval; + } int result_size = iv.length ();