]> Cypherpunks repositories - gostls13.git/commitdiff
strconv.Unquote could wrongly return a nil error on error.
authorRoger Peppe <rogpeppe@gmail.com>
Mon, 29 Mar 2010 17:09:29 +0000 (10:09 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 29 Mar 2010 17:09:29 +0000 (10:09 -0700)
R=rsc, gri
CC=golang-dev
https://golang.org/cl/773041

src/pkg/strconv/quote.go

index ccd1062645451a2ae57ba51fdb4bd65267bf2607..53774ee6f87f7b5401bdcde456af07d00e5b4af9 100644 (file)
@@ -239,7 +239,7 @@ func Unquote(s string) (t string, err os.Error) {
                return s, nil
        }
        if quote != '"' && quote != '\'' {
-               return "", err
+               return "", os.EINVAL
        }
 
        var buf bytes.Buffer