0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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.
This commit is contained in:
Bram Moolenaar 2018-01-30 22:52:06 +01:00
parent ce46d934af
commit a172b63ab8
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -771,6 +771,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1442,
/**/
1441,
/**/