Mercurial > vim
comparison src/spellsuggest.c @ 21106:47978b89a02e v8.2.1104
patch 8.2.1104: Coverity warnts for possible NULL pointer use
Commit: https://github.com/vim/vim/commit/11b6600c88165c70d9ccbbdd4d9c96e8266e365f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 1 13:15:24 2020 +0200
patch 8.2.1104: Coverity warnts for possible NULL pointer use
Problem: Coverity warnts for possible NULL pointer use.
Solution: Check "pbyts" is not NULL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 01 Jul 2020 13:30:04 +0200 |
parents | e01b20e3a720 |
children | 514d622473af |
comparison
equal
deleted
inserted
replaced
21105:4851b16ccb56 | 21106:47978b89a02e |
---|---|
1404 ? VIM_ISWHITE(fword[sp->ts_fidx]) | 1404 ? VIM_ISWHITE(fword[sp->ts_fidx]) |
1405 : !spell_iswordp(fword + sp->ts_fidx, curwin))); | 1405 : !spell_iswordp(fword + sp->ts_fidx, curwin))); |
1406 tword[sp->ts_twordlen] = NUL; | 1406 tword[sp->ts_twordlen] = NUL; |
1407 | 1407 |
1408 if (sp->ts_prefixdepth <= PFD_NOTSPECIAL | 1408 if (sp->ts_prefixdepth <= PFD_NOTSPECIAL |
1409 && (sp->ts_flags & TSF_PREFIXOK) == 0) | 1409 && (sp->ts_flags & TSF_PREFIXOK) == 0 |
1410 && pbyts != NULL) | |
1410 { | 1411 { |
1411 // There was a prefix before the word. Check that the prefix | 1412 // There was a prefix before the word. Check that the prefix |
1412 // can be used with this word. | 1413 // can be used with this word. |
1413 // Count the length of the NULs in the prefix. If there are | 1414 // Count the length of the NULs in the prefix. If there are |
1414 // none this must be the first try without a prefix. | 1415 // none this must be the first try without a prefix. |