diff options
| author | nyamatongwe <unknown> | 2009-03-02 12:06:13 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2009-03-02 12:06:13 +0000 | 
| commit | bec2a01c474e70f13576dc77cc703115bef87dc3 (patch) | |
| tree | 3a88ed9a37068656cbe2bd02b644f751ccb1718b /src/LexPerl.cxx | |
| parent | 3b9d55b49a68f86b39edaa5b551a5e772cfaaa25 (diff) | |
| download | scintilla-mirror-bec2a01c474e70f13576dc77cc703115bef87dc3.tar.gz | |
Bug #2648342 Bug in LexPerl string comparison fixed.
Diffstat (limited to 'src/LexPerl.cxx')
| -rw-r--r-- | src/LexPerl.cxx | 5 | 
1 files changed, 3 insertions, 2 deletions
| diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx index 4b7c9878a..4853460bf 100644 --- a/src/LexPerl.cxx +++ b/src/LexPerl.cxx @@ -247,8 +247,9 @@ static bool styleCheckSubPrototype(Accessor &styler, unsigned int bk)  static bool isMatch(const char *sref, char *s)  {  	// match per-line delimiter - must kill trailing CR if CRLF -	if (s[strlen(s) - 1] == '\r') -		s[strlen(s) - 1] = '\0'; +	int i = strlen(s); +	if (i != 0 && s[i - 1] == '\r') +		s[i - 1] = '\0';  	return (strcmp(sref, s) == 0);  } | 
