Description regexp: fix index panic in Replace
When using subexpressions ($1) as replacements, when they either don't exist or values weren't found causes a panic.
This patch ensures that the match location isn't -1, to prevent out of bounds errors.
Fixes issue 3816.
Patch Set 1 #Patch Set 2 : diff -r ec3ae5b98922 https://code.google.com/p/go #Patch Set 3 : diff -r ec3ae5b98922 https://code.google.com/p/go #
Total comments: 1
Patch Set 4 : diff -r ec3ae5b98922 https://code.google.com/p/go #
Total comments: 2
Patch Set 5 : diff -r ec3ae5b98922 https://code.google.com/p/go #Patch Set 6 : diff -r ec3ae5b98922 https://code.google.com/p/go #MessagesTotal messages: 16
|