diff options
author | jakub <jakub@vrana.cz> | 2012-03-25 02:21:08 -0700 |
---|---|---|
committer | jakub <jakub@vrana.cz> | 2012-03-25 02:21:08 -0700 |
commit | dbe7028e055a6e2a1dfc45977da381637b20aafb (patch) | |
tree | 1378ebb65747191ce2dddbbed0509c6dd2ce5f10 | |
parent | ef17ad905b7fcdc361e17e59e929352377cb0768 (diff) | |
download | scintilla-mirror-dbe7028e055a6e2a1dfc45977da381637b20aafb.tar.gz |
Replace \0 by found text in regular expressions search
-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 |