From 01f10711d42321c15727f6714d9d37ff48371c3c Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 4 May 2018 20:38:26 +0000 Subject: [PATCH] fix uninitialized --- lib/libedit/filecomplete.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libedit/filecomplete.c b/lib/libedit/filecomplete.c index 213a0f462046..4593bbc601b9 100644 --- a/lib/libedit/filecomplete.c +++ b/lib/libedit/filecomplete.c @@ -1,4 +1,4 @@ -/* $NetBSD: filecomplete.c,v 1.50 2018/05/04 16:39:14 abhinav Exp $ */ +/* $NetBSD: filecomplete.c,v 1.51 2018/05/04 20:38:26 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "config.h" #if !defined(lint) && !defined(SCCSID) -__RCSID("$NetBSD: filecomplete.c,v 1.50 2018/05/04 16:39:14 abhinav Exp $"); +__RCSID("$NetBSD: filecomplete.c,v 1.51 2018/05/04 20:38:26 christos Exp $"); #endif /* not lint && not SCCSID */ #include @@ -552,7 +552,9 @@ find_word_to_complete(const wchar_t * cursor, const wchar_t * buffer, default: cursor_at_quote = 0; } - } + } else + cursor_at_quote = 0; + while (ctemp > buffer && !wcschr(word_break, ctemp[-1]) && (!special_prefixes || !wcschr(special_prefixes, ctemp[-1])))