Source-Changes-HG archive

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

[src/trunk]: src/lib/libcurses Avoid curx going beyond end of window when add...



details:   https://anonhg.NetBSD.org/src/rev/a732833adfea
branches:  trunk
changeset: 365232:a732833adfea
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Aug 08 02:26:08 2018 +0000

description:
Avoid curx going beyond end of window when adding a wide character to the
last column.

OK @blymn.

diffstat:

 lib/libcurses/addbytes.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 435c6093b480 -r a732833adfea lib/libcurses/addbytes.c
--- a/lib/libcurses/addbytes.c  Tue Aug 07 22:55:47 2018 +0000
+++ b/lib/libcurses/addbytes.c  Wed Aug 08 02:26:08 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: addbytes.c,v 1.47 2017/01/06 14:25:41 roy Exp $        */
+/*     $NetBSD: addbytes.c,v 1.48 2018/08/08 02:26:08 simonb Exp $     */
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c 8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.47 2017/01/06 14:25:41 roy Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.48 2018/08/08 02:26:08 simonb Exp $");
 #endif
 #endif                         /* not lint */
 
@@ -582,7 +582,7 @@
                if (newx > *(*lnp)->lastchp)
                        *(*lnp)->lastchp = newx;
                __touchline(win, *y, sx, (int) win->maxx - 1);
-               win->curx = sx;
+               *x = win->curx = sx;
        } else {
                win->curx = *x;
 



Home | Main Index | Thread Index | Old Index