From d6f2922e91928b5191a5c5f1b3a6b320712b5ce3 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 29 Jan 2013 20:52:43 +0000 Subject: libgo: Update Go library to master revision 15489/921e53d4863c. From-SVN: r195560 --- libgo/go/regexp/regexp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgo/go/regexp/regexp.go') diff --git a/libgo/go/regexp/regexp.go b/libgo/go/regexp/regexp.go index bcf354b..c516a15 100644 --- a/libgo/go/regexp/regexp.go +++ b/libgo/go/regexp/regexp.go @@ -767,7 +767,7 @@ func (re *Regexp) expand(dst []byte, template string, bsrc []byte, src string, m } template = rest if num >= 0 { - if 2*num+1 < len(match) { + if 2*num+1 < len(match) && match[2*num] >= 0 { if bsrc != nil { dst = append(dst, bsrc[match[2*num]:match[2*num+1]]...) } else { -- cgit v1.1