From 1e83e35cb1e1dc24377b5a35cfffbf65eb6d4f4e Mon Sep 17 00:00:00 2001 From: jiri Date: Wed, 13 Sep 2006 18:50:56 +0000 Subject: [PATCH] *** empty log message *** --- mat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mat.h b/mat.h index 8136d73..897e2a2 100644 --- a/mat.h +++ b/mat.h @@ -267,7 +267,7 @@ inline T & NRMat::operator()(const int i, const int j) { #ifdef DEBUG if (*count != 1) laerror("Mat lval use of (,) with count > 1"); - if (i<0 || i>=nn || j<0 || j>=mm) laerror("Mat (,) out of range"); + if (i<0 || i>=nn &&nn>0 || j<0 || j>=mm && mm>0) laerror("Mat (,) out of range"); if (!v) laerror("(,) for unallocated Mat"); #endif #ifdef MATPTR @@ -280,7 +280,7 @@ template inline const T & NRMat::operator()(const int i, const int j) const { #ifdef DEBUG - if (i<0 || i>=nn || j<0 || j>=mm) laerror("Mat (,) out of range"); + if (i<0 || i>=nn&&nn>0 || j<0 || j>=mm&& mm>0) laerror("Mat (,) out of range"); if (!v) laerror("(,) for unallocated Mat"); #endif #ifdef MATPTR