diff options
| author | nyamatongwe <devnull@localhost> | 2009-03-02 12:06:13 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2009-03-02 12:06:13 +0000 | 
| commit | 5ddeca87f39167de96aa2a566811c4e38a6c9f36 (patch) | |
| tree | 3a88ed9a37068656cbe2bd02b644f751ccb1718b /src | |
| parent | aedffb5c93e534d571dce30cbb8df0197c7c55c0 (diff) | |
| download | scintilla-mirror-5ddeca87f39167de96aa2a566811c4e38a6c9f36.tar.gz | |
Bug #2648342 Bug in LexPerl string comparison fixed.
Diffstat (limited to 'src')
| -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);  }  | 
