From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  4-MAR-1991 07:43:37.17
To:	ARISIA::EVERHART
CC:	
Subj:	Bug fix for new xloadimage (2.03)

From:	RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2
To:	Everhart@Arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.88)
	 id AA12482; Mon, 4 Mar 91 07:04:05 EST
Received: From UCBVAX.BERKELEY.EDU by CRVAX.SRI.COM with TCP; Fri,  1 MAR 91 18:21:39 PST
Received: by ucbvax.Berkeley.EDU (5.63/1.42)
	id AA02019; Fri, 1 Mar 91 18:14:33 -0800
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 2 Mar 91 00:54:17 GMT
From: amazon.llnl.gov!oberman@lll-winken.llnl.gov
Subject: Bug fix for new xloadimage (2.03)
Message-Id: <1991Mar1.175417.1@amazon.llnl.gov>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

I installed the new version of xloadimage. It works much better under VMS and
DECwindows than the prior version. It now finds the correct pseudo-root window
for onroot operations and such, but I did find two problems.

The first is that the -onroot operation does not seem to do a refresh so that
the root does not change until it has been covered and re-exposed. I have not
looked at this one yet.

The second is universal. In fill.c there is a bug that produces an access
violation. The inner fill loop does not divide the number of pixels in a line
by 8, so when it nears the bottom of the array, it overruns the array.

The fix is to change line 37 in fill.c from:
      for (x= fx; x < fw; x++) {
to:
      for (x= fx; x < fw / 8; x++) {

I think the outer loop also overruns by one line because the counter starts at
0, not 1. In any case, I changed line 34 from:
    for (y= fy; y < fy + fh; y++) {
to:
    for (y= fy; y < fy + fh - 1; y++) {
and it seems to work correctly.

					R. Kevin Oberman
					Lawrence Livermore National Laboratory
					Internet: oberman@icdc.llnl.gov
   					(415) 422-6955

Disclaimer: Don't take this too seriously. I just like to improve my typing
and probably don't really know anything useful about anything.

