diff options
author | Unknown <jakub@vrana.cz> | 2012-03-25 02:21:08 -0700 |
---|---|---|
committer | Unknown <jakub@vrana.cz> | 2012-03-25 02:21:08 -0700 |
commit | 5a5bf314e81c24f22f122777c5fffb34561b912e (patch) | |
tree | 56a7a288db46901a06ca3d89fee1a30f2fbf5291 /src/Document.cxx | |
parent | e04b15d7a4a547c18b7ce469ef4ac3b48c00ed56 (diff) | |
download | scintilla-mirror-5a5bf314e81c24f22f122777c5fffb34561b912e.tar.gz |
Replace \0 by found text in regular expressions search
Diffstat (limited to 'src/Document.cxx')
-rw-r--r-- | src/Document.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index fae97856a..0c73024d5 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -2194,7 +2194,7 @@ const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, unsigned int lenResult = 0; for (int i = 0; i < *length; i++) { if (text[i] == '\\') { - if (text[i + 1] >= '1' && text[i + 1] <= '9') { + if (text[i + 1] >= '0' && text[i + 1] <= '9') { unsigned int patNum = text[i + 1] - '0'; lenResult += search.eopat[patNum] - search.bopat[patNum]; i++; @@ -2220,7 +2220,7 @@ const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text, char *o = substituted; for (int j = 0; j < *length; j++) { if (text[j] == '\\') { - if (text[j + 1] >= '1' && text[j + 1] <= '9') { + if (text[j + 1] >= '0' && text[j + 1] <= '9') { unsigned int patNum = text[j + 1] - '0'; unsigned int len = search.eopat[patNum] - search.bopat[patNum]; if (search.pat[patNum]) // Will be null if try for a match that did not occur |