diff options
Diffstat (limited to 'src')
| -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  | 
