From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 17-JUL-1989 17:31
To:	MRGATE::"ARISIA::EVERHART"
Subj:	minor bugfix to swing

Message-Id:  <8907172117.AA22440@crdgw1.ge.com>
Received: From KL.SRI.COM ([0.0.0.0]) by CRVAX.SRI.COM with TCP; Mon, 17 JUL 89 13:02:37 PDT
Received: from CUNYVM.CUNY.EDU by KL.SRI.COM with TCP; Mon, 17 Jul 89 13:04:04 PDT
Received: from UKACRL.BITNET by CUNYVM.CUNY.EDU (IBM VM SMTP R1.1) with BSMTP id 3913; Mon, 17 Jul 89 15:54:00 EDT
Received: from RL.IB by UKACRL.BITNET (Mailer X1.25) with BSMTP id 8815; Mon,
 17 Jul 89 20:45:48 BST
Received: from RL.IB by UK.AC.RL.IB (Mailer X1.25) with BSMTP id 4277; Mon, 17
          Jul 89 20:45:48 BS
Via:      UK.AC.KCL.CC.ASH; 17 JUL 89 20:45:44 BST
Date:     Mon, 17 JUL 89 20:42:48 GMT
From: UDAA055%ASH.CC.KCL.AC.UK@CUNYVM.CUNY.EDU
To: info-vax@KL.SRI.COM
Subject:  minor bugfix to swing
Sender: JANET "UDAA055@UK.AC.KCL.CC.ASH" <UDAA055%ASH.CC.KCL.AC.UK@CUNYVM.CUNY.EDU>
Mailer:   Janet_Mailshr V3.4 (23-May-1989)

Here is a very minor patch to the SWING program to fix a bug that causes a
subscript range check when the right arrow key is pressed and there are no
further directories to the right of the current one.

Strictly speaking the fix below is not the correct one. It takes advantage of
the fact that evaluation of the while condition  is left to right with no
further evaluation as soon as the result is established. In other words, it
doesnt evaluate the second condition if the first is FALSE (since that cannot
alter the outcome of the test) thereby avoiding using a value of 'ii' which is
too high in the second test.

A proper fix ought to rewrite this code in a system independent manner.

Regards,

Andy Harper
Kings College London UK


************
File DISK$COMPCENT:[UDAA055.SCRATCH]SWING.FOR;2
  162               do while( ii.le. MAX_LEVELS .and. node_pointer(ii,jj) .eq. 0
 )
  163                  ii = ii + 1
******
File DISK$COMPCENT:[UDAA055.SCRATCH]SWING.FOR;1
  162               do while( node_pointer(ii,jj) .eq. 0 .and.ii.le. MAX_LEVELS)
  163                  ii = ii + 1
************

Number of difference sections found: 1
Number of difference records found: 1

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DISK$COMPCENT:[UDAA055]SWING.BUGFIX;1-
    DISK$COMPCENT:[UDAA055.SCRATCH]SWING.FOR;2-
    DISK$COMPCENT:[UDAA055.SCRATCH]SWING.FOR;1

