From b30c979b0bfdc0aac3736f9c0e6e75d9e5451b86 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Mon, 13 Feb 1995 15:18:04 +0000 Subject: [PATCH] Set states defined true if any state value OR string is defined --- src/rec/recMbbi.c | 7 ++++--- src/rec/recMbbo.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/rec/recMbbi.c b/src/rec/recMbbi.c index b21429084..a114a0be0 100644 --- a/src/rec/recMbbi.c +++ b/src/rec/recMbbi.c @@ -128,13 +128,14 @@ static void init_common(pmbbi) struct mbbiRecord *pmbbi; { unsigned long *pstate_values; + char *pstate_string; short i; /* determine if any states are defined */ - pstate_values = &(pmbbi->zrvl); + pstate_values = &(pmbbi->zrvl); pstate_string = pmbbi->zrst; pmbbi->sdef = FALSE; - for (i=0; i<16; i++) { - if (*(pstate_values+i) != 0) { + for (i=0; i<16; i++, pstate_string += sizeof(pmbbi->zrst)) { + if((*(pstate_values+i) != 0) || (*pstate_string !='\0')) { pmbbi->sdef = TRUE; return; } diff --git a/src/rec/recMbbo.c b/src/rec/recMbbo.c index 475f4d393..856ec0e0c 100644 --- a/src/rec/recMbbo.c +++ b/src/rec/recMbbo.c @@ -136,13 +136,14 @@ static void init_common(pmbbo) struct mbboRecord *pmbbo; { unsigned long *pstate_values; + char *pstate_string; short i; /* determine if any states are defined */ - pstate_values = &(pmbbo->zrvl); + pstate_values = &(pmbbo->zrvl); pstate_string = pmbbo->zrst; pmbbo->sdef = FALSE; - for (i=0; i<16; i++) { - if (*(pstate_values+i)!= 0) { + for (i=0; i<16; i++, pstate_string += sizeof(pmbbo->zrst)) { + if((*(pstate_values+i)!= 0) || (*pstate_string !='\0')) { pmbbo->sdef = TRUE; return; }