From 464b048a5b2b68983fdd2cd2a37e3da11c28981e Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Tue, 8 Oct 1991 10:19:20 +0000 Subject: [PATCH] fixed conversion when off ends of table --- src/libCom/cvtBpt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libCom/cvtBpt.c b/src/libCom/cvtBpt.c index 35aa26702..5194e1227 100644 --- a/src/libCom/cvtBpt.c +++ b/src/libCom/cvtBpt.c @@ -82,12 +82,14 @@ long cvtRawToEngBpt(pval,linr,init,ppbrk,plbrk) pInt = pbrkTable->papBrkInt[lbrk]; if( lbrk >= number-1) { status=1; + break; } pnxtInt = pbrkTable->papBrkInt[lbrk+1]; } while( (pInt->raw) > val) { if(lbrk==0) { status=1; + break; } lbrk--; pInt = pbrkTable->papBrkInt[lbrk]; @@ -138,12 +140,14 @@ long cvtEngToRawBpt(pval,linr,init,ppbrk,plbrk) pInt = pbrkTable->papBrkInt[lbrk]; if( lbrk >= number-1) { status=1; + break; } pnxtInt = pbrkTable->papBrkInt[lbrk+1]; } while( (pInt->eng) > val) { if(lbrk==0) { status=1; + break; } lbrk--; pInt = pbrkTable->papBrkInt[lbrk];