summaryrefslogtreecommitdiff
path: root/src/if_cscope.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-01-30 22:52:06 +0100
committerBram Moolenaar <Bram@vim.org>2018-01-30 22:52:06 +0100
commita172b63ab8661019dba61285a738c8b6b55a33aa (patch)
tree88c353405f95e8bdcf4ebf0e8f9afdf6a0162185 /src/if_cscope.c
parentce46d934af35d0f774be7f996001db03cf0b894a (diff)
downloadvim-git-a172b63ab8661019dba61285a738c8b6b55a33aa.tar.gz
patch 8.0.1442: using pointer before it is setv8.0.1442
Problem: Using pointer before it is set. Solution: Search in whole buffer instead of next token.
Diffstat (limited to 'src/if_cscope.c')
-rw-r--r--src/if_cscope.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c
index 9466c34f9..4bf28ad1d 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;