Commit 4953dcec authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: add another warning for an impossible condition

No related merge requests found
Showing with 3 additions and 2 deletions
+3 -2
......@@ -237,9 +237,10 @@ bool is_separate_word(size_t position, size_t length, const char *buf)
const char *strstrwrapper(const char *haystack, const char *needle,
const char *start)
{
/* Just in case we search for an empty needle. :/ */
if (*needle == '\0')
if (*needle == '\0') {
statusline(ALERT, "Searching for nothing -- please report a bug");
return (char *)start;
}
if (ISSET(USE_REGEXP)) {
if (ISSET(BACKWARDS_SEARCH)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment