Module Name:    src
Committed By:   uwe
Date:           Thu Jul  2 23:43:01 UTC 2020

Modified Files:
        src/lib/libcurses: cchar.c

Log Message:
setcchar - don't lose combining marks to a typo.

We copy len wchars but set the length field to 1, instead of len.
>From Naman Jain in PR lib/55443


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libcurses/cchar.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/cchar.c
diff -u src/lib/libcurses/cchar.c:1.11 src/lib/libcurses/cchar.c:1.12
--- src/lib/libcurses/cchar.c:1.11	Thu Nov 22 22:16:45 2018
+++ src/lib/libcurses/cchar.c	Thu Jul  2 23:43:01 2020
@@ -1,4 +1,4 @@
-/*   $NetBSD: cchar.c,v 1.11 2018/11/22 22:16:45 uwe Exp $ */
+/*   $NetBSD: cchar.c,v 1.12 2020/07/02 23:43:01 uwe Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: cchar.c,v 1.11 2018/11/22 22:16:45 uwe Exp $");
+__RCSID("$NetBSD: cchar.c,v 1.12 2020/07/02 23:43:01 uwe Exp $");
 #endif						  /* not lint */
 
 #include <string.h>
@@ -113,7 +113,7 @@ setcchar(cchar_t *wcval, const wchar_t *
 		wcval->attributes = attrs & ~__COLOR;
 		if (__using_color && color_pair)
 			wcval->attributes |= COLOR_PAIR(color_pair);
-		wcval->elements = 1;
+		wcval->elements = len;
 		memcpy(&wcval->vals, wch, len * sizeof(wchar_t));
 	}
 

Reply via email to