Mercurial > hg > octave-avbm
changeset 381:3dc943e34d9a
[project @ 1994-03-09 00:33:24 by jwe]
author | jwe |
---|---|
date | Wed, 09 Mar 1994 00:33:24 +0000 |
parents | 568caeb70630 |
children | e02d6b664394 |
files | src/tc-index.cc |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/tc-index.cc +++ b/src/tc-index.cc @@ -1,7 +1,7 @@ // tc-index.cc -*- C++ -*- /* -Copyright (C) 1992, 1993 John W. Eaton +Copyright (C) 1992, 1993, 1994 John W. Eaton This file is part of Octave. @@ -360,6 +360,12 @@ int len = nr > nc ? nr : nc; + if (nr == 0 || nc == 0) + { + ::error ("attempt to index empty matrix"); + return retval; + } + assert ((nr == 1 || nc == 1) && ! user_pref.do_fortran_indexing); int swap_indices = (nr == 1);