diff options
| author | nyamatongwe <unknown> | 2010-06-18 01:01:56 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2010-06-18 01:01:56 +0000 | 
| commit | c24f3f8fbc8b12e1a568c7ca992021fe0148cae9 (patch) | |
| tree | a83536f94e871ba3a1e76a22677aebed3a5f5968 /src | |
| parent | a94c4ed8353e7eec5477bb14ea29f29547c08d50 (diff) | |
| download | scintilla-mirror-c24f3f8fbc8b12e1a568c7ca992021fe0148cae9.tar.gz | |
Fix for bug #3017572 FindText crashes with empty text
Always return start position when search text is empty.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Document.cxx | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index 3c90d1f42..bc3ae0979 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1151,6 +1151,8 @@ bool Document::MatchesWordOptions(bool word, bool wordStart, int pos, int length  long Document::FindText(int minPos, int maxPos, const char *search,                          bool caseSensitive, bool word, bool wordStart, bool regExp, int flags,                          int *length, CaseFolder *pcf) { +	if (*length <= 0) +		return minPos;  	if (regExp) {  		if (!regex)  			regex = CreateRegexSearch(&charClass); | 
