Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix return value of search_find_text() when the match is out of bounds
When performing a regular expression search on a range, and there is a match past the end of the range, search_find_text() used to improperly return the position of the match, but without filling the Sci_TextToFind structure. This lead to the calling code assume there was a match, and maybe read the uninitialized fields in the Sci_TextToFind structure, thus leading to undefined behavior. So, fix search_find_text() so it properly returns -1 when there is a match but it is outside the bounds.
- Loading branch information