X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fadd_tries.c;h=f9a4cce680a27a5215522fa9fe3712bb91d9308f;hp=29a1a60045b537411ef6642d6b724a72e4eb8a7c;hb=f8f67d02e909c4d165fbed2ba2810c94f2862548;hpb=f79b52fddd95c7a6f1ead29ef9c39eb8cdf60795;ds=sidebyside diff --git a/ncurses/tinfo/add_tries.c b/ncurses/tinfo/add_tries.c index 29a1a600..f9a4cce6 100644 --- a/ncurses/tinfo/add_tries.c +++ b/ncurses/tinfo/add_tries.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2019 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +39,7 @@ #include -MODULE_ID("$Id: add_tries.c,v 1.10 2010/12/19 01:31:14 tom Exp $") +MODULE_ID("$Id: add_tries.c,v 1.11 2019/07/27 22:59:11 tom Exp $") #define SET_TRY(dst,src) if ((dst->ch = *src++) == 128) dst->ch = '\0' #define CMP_TRY(a,b) ((a)? (a == b) : (b == 128)) @@ -109,6 +109,7 @@ _nc_add_to_try(TRIES ** tree, const char *str, unsigned code) savedptr = ptr->child; free(ptr); } + *tree = NULL; returnCode(ERR); }