From a172b63ab8661019dba61285a738c8b6b55a33aa Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 30 Jan 2018 22:52:06 +0100 Subject: patch 8.0.1442: using pointer before it is set Problem: Using pointer before it is set. Solution: Search in whole buffer instead of next token. --- src/if_cscope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/if_cscope.c') diff --git a/src/if_cscope.c b/src/if_cscope.c index 9466c34f9d..4bf28ad1d1 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -702,7 +702,7 @@ cs_cnt_matches(int idx) * Accept "\S*cscope: X lines", also matches "mlcscope". * Bail out for the "Unable to search" error. */ - if (strstr((const char *)stok, "Unable to search database") != NULL) + if (strstr((const char *)buf, "Unable to search database") != NULL) break; if ((stok = strtok(buf, (const char *)" ")) == NULL) continue; -- cgit v1.2.3