]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/base/tries.c
ncurses 6.4 - patch 20240420
[ncurses.git] / ncurses / base / tries.c
index 0f309c213c456f87ceb6fdf9889c33a29aab5716..0f8c0516e88f0ab36cebfcec4ef368345d2aa528 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright 2020 Thomas E. Dickey                                          *
+ * Copyright 2020,2023 Thomas E. Dickey                                     *
  * Copyright 1998-2009,2010 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
@@ -39,8 +39,9 @@
 */
 
 #include <curses.priv.h>
+#include <tic.h>
 
-MODULE_ID("$Id: tries.c,v 1.31 2020/02/02 23:34:34 tom Exp $")
+MODULE_ID("$Id: tries.c,v 1.32 2023/06/24 15:36:23 tom Exp $")
 
 /*
  * Expand a keycode into the string that it corresponds to, returning null if
@@ -124,7 +125,7 @@ _nc_remove_string(TRIES ** tree, const char *string)
 {
     T((T_CALLED("_nc_remove_string(%p,%s)"), (void *) tree, _nc_visbuf(string)));
 
-    if (string == 0 || *string == 0)
+    if (!VALID_STRING(string) || *string == 0)
        returnCode(FALSE);
 
     while (*tree != 0) {