X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fbase%2Ftries.c;fp=ncurses%2Fbase%2Ftries.c;h=0f8c0516e88f0ab36cebfcec4ef368345d2aa528;hb=91494ab0071e71177728916199a406768f5ef963;hp=0f309c213c456f87ceb6fdf9889c33a29aab5716;hpb=f79c210479470378389aab5b8d4d42d4a7f3d9a4;p=ncurses.git diff --git a/ncurses/base/tries.c b/ncurses/base/tries.c index 0f309c21..0f8c0516 100644 --- a/ncurses/base/tries.c +++ b/ncurses/base/tries.c @@ -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 +#include -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) {