Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses setcchar - don't lose combining marks to a typo.
details: https://anonhg.NetBSD.org/src/rev/885deb0f7e1f
branches: trunk
changeset: 935436:885deb0f7e1f
user: uwe <uwe%NetBSD.org@localhost>
date: Thu Jul 02 23:43:01 2020 +0000
description:
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
diffstat:
lib/libcurses/cchar.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e884542d01a0 -r 885deb0f7e1f lib/libcurses/cchar.c
--- a/lib/libcurses/cchar.c Thu Jul 02 19:11:01 2020 +0000
+++ b/lib/libcurses/cchar.c Thu Jul 02 23:43:01 2020 +0000
@@ -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 @@
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));
}
Home |
Main Index |
Thread Index |
Old Index