commit | 54b7ccd514f6a689347c8d1f876bec90613f28f8 | [log] [tgz] |
---|---|---|
author | Erik St. Martin <alakriti@gmail.com> | Sat Dec 22 11:14:56 2012 -0500 |
committer | Russ Cox <rsc@golang.org> | Sat Dec 22 11:14:56 2012 -0500 |
tree | 2afc12514a10da1d0150506c0cacc38ce013e14e | |
parent | 90a85dbefcc7047eaa0a4466a344a6457b856b74 [diff] |
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 #3816. R=franciscossouza, rsc CC=golang-dev https://golang.org/cl/6931049