NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/41257: curses: getyx + wmove violates least astonishment past end-of-line



The following reply was made to PR lib/41257; it has been noted by GNATS.

From: Brett Lymn <blymn%baesystems.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: lib-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost, 
netbsd-bugs%netbsd.org@localhost
Subject: Re: lib/41257: curses: getyx + wmove violates least astonishment past 
end-of-line
Date: Tue, 21 Apr 2009 23:08:37 +0930

 Try this patch, it makes the test program behave as expected for me:
 
 Index: addbytes.c
 ===================================================================
 RCS file: /cvsroot/src/lib/libcurses/addbytes.c,v
 retrieving revision 1.34
 diff -u -r1.34 addbytes.c
 --- addbytes.c 4 Jul 2008 16:52:10 -0000       1.34
 +++ addbytes.c 21 Apr 2009 13:36:36 -0000
 @@ -540,7 +540,7 @@
                /* Mark as "continuation" cell */
                tp->attr |= __WCWIDTH;
        }
 -      if (*x == win->maxx) {
 +      if (*x >= win->maxx - 1) {
                (*lnp)->flags |= __ISPASTEOL;
                newx = win->maxx - 1 + win->ch_off;
                if (newx > *(*lnp)->lastchp)
 
 -- 
 Brett Lymn
 "Warning:
 The information contained in this email and any attached files is
 confidential to BAE Systems Australia. If you are not the intended
 recipient, any use, disclosure or copying of this email or any
 attachments is expressly prohibited.  If you have received this email
 in error, please notify us immediately. VIRUS: Every care has been
 taken to ensure this email and its attachments are virus free,
 however, any loss or damage incurred in using this email is not the
 sender's responsibility.  It is your responsibility to ensure virus
 checks are completed before installing any data sent in this email to
 your computer."
 
 


Home | Main Index | Thread Index | Old Index