diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/search.c b/src/search.c index 34dcc7e78a2..b80c1411cf6 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -2454,8 +2454,8 @@ since only regular expressions have distinguished subexpressions.") | |||
| 2454 | for (pos_byte = 0, pos = 0; pos_byte < length;) | 2454 | for (pos_byte = 0, pos = 0; pos_byte < length;) |
| 2455 | { | 2455 | { |
| 2456 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 2456 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| 2457 | unsigned char *add_stuff; | 2457 | unsigned char *add_stuff = NULL; |
| 2458 | int add_len; | 2458 | int add_len = 0; |
| 2459 | int idx = -1; | 2459 | int idx = -1; |
| 2460 | 2460 | ||
| 2461 | if (str_multibyte) | 2461 | if (str_multibyte) |
| @@ -2535,8 +2535,11 @@ since only regular expressions have distinguished subexpressions.") | |||
| 2535 | } | 2535 | } |
| 2536 | 2536 | ||
| 2537 | /* Now add to the end of SUBSTED. */ | 2537 | /* Now add to the end of SUBSTED. */ |
| 2538 | bcopy (add_stuff, substed + substed_len, add_len); | 2538 | if (add_stuff) |
| 2539 | substed_len += add_len; | 2539 | { |
| 2540 | bcopy (add_stuff, substed + substed_len, add_len); | ||
| 2541 | substed_len += add_len; | ||
| 2542 | } | ||
| 2540 | } | 2543 | } |
| 2541 | 2544 | ||
| 2542 | /* Now insert what we accumulated. */ | 2545 | /* Now insert what we accumulated. */ |