From 1021cebe332801ccc6945b8875872e63476d8c7b Mon Sep 17 00:00:00 2001 From: jiri Date: Fri, 14 Mar 2008 15:37:20 +0000 Subject: [PATCH] *** empty log message *** --- mat.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mat.h b/mat.h index 4a50635..d2bdfff 100644 --- a/mat.h +++ b/mat.h @@ -495,8 +495,13 @@ template void NRMat::resize(const int n, const int m) { #ifdef DEBUG - if (n<0 || m<0 || n>0 && m==0 || n==0 && m>0) laerror("illegal dimensions in Mat::resize()"); + if (n<0 || m<0) laerror("illegal dimensions in Mat::resize()"); #endif + +//allow trivial dimensions +if(n==0) m=0; +if(m==0) n=0; + if (count) { if(n==0 && m==0)