aboutsummaryrefslogtreecommitdiff
path: root/ncurses/base/key_defined.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/base/key_defined.c')
-rw-r--r--ncurses/base/key_defined.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ncurses/base/key_defined.c b/ncurses/base/key_defined.c
index 25d5a674e1b8..147e5fe2db93 100644
--- a/ncurses/base/key_defined.c
+++ b/ncurses/base/key_defined.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2023 Thomas E. Dickey *
* Copyright 2003-2006,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
@@ -32,8 +32,9 @@
****************************************************************************/
#include <curses.priv.h>
+#include <tic.h>
-MODULE_ID("$Id: key_defined.c,v 1.10 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: key_defined.c,v 1.11 2023/06/24 15:36:32 tom Exp $")
static int
find_definition(TRIES * tree, const char *str)
@@ -41,7 +42,7 @@ find_definition(TRIES * tree, const char *str)
TRIES *ptr;
int result = OK;
- if (str != 0 && *str != '\0') {
+ if (VALID_STRING(str) && *str != '\0') {
for (ptr = tree; ptr != 0; ptr = ptr->sibling) {
if (UChar(*str) == UChar(ptr->ch)) {
if (str[1] == '\0' && ptr->child != 0) {