diff options
Diffstat (limited to 'ncurses/widechar/lib_cchar.c')
| -rw-r--r-- | ncurses/widechar/lib_cchar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ncurses/widechar/lib_cchar.c b/ncurses/widechar/lib_cchar.c index 451c5dcb518b..b535946161c5 100644 --- a/ncurses/widechar/lib_cchar.c +++ b/ncurses/widechar/lib_cchar.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2019-2021,2022 Thomas E. Dickey * + * Copyright 2019-2022,2024 Thomas E. Dickey * * Copyright 2001-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -37,7 +37,7 @@ #include <curses.priv.h> #include <wchar.h> -MODULE_ID("$Id: lib_cchar.c,v 1.38 2022/07/27 08:03:16 tom Exp $") +MODULE_ID("$Id: lib_cchar.c,v 1.40 2024/12/07 18:07:52 tom Exp $") /* * The SuSv2 description leaves some room for interpretation. We'll assume wch @@ -119,7 +119,7 @@ getcchar(const cchar_t *wcval, } else #endif if (wcval != NULL) { - wchar_t *wp; + const wchar_t *wp; int len; #if HAVE_WMEMCHR @@ -135,7 +135,7 @@ getcchar(const cchar_t *wcval, * If the value is not a null, return the length plus 1 for null. */ code = (len < CCHARW_MAX) ? (len + 1) : CCHARW_MAX; - } else if (attrs == 0 || pair_arg == 0) { + } else if (attrs == NULL || pair_arg == NULL) { code = ERR; } else if (len >= 0) { int color_pair; |
