diff options
author | Josh Bleecher Snyder <josharian@gmail.com> | 2019-01-02 18:36:24 -1000 |
---|---|---|
committer | alandonovan <adonovan@google.com> | 2019-01-02 23:36:24 -0500 |
commit | 74f6cacf9e604301442678325c3dfb2d0caeb0ab (patch) | |
tree | 2be81d7e7c7d3e55acb43c521aa8d1e21a973bad /syntax/quote.go | |
parent | f9eba728dc959ed06f508aaac74f1fe710800c8f (diff) | |
download | starlark-go-74f6cacf9e604301442678325c3dfb2d0caeb0ab.tar.gz |
syntax: parse unicode escape sequences as uints (#96)
Fixes #85
Diffstat (limited to 'syntax/quote.go')
-rw-r--r-- | syntax/quote.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/syntax/quote.go b/syntax/quote.go index e08d780..d31eb2a 100644 --- a/syntax/quote.go +++ b/syntax/quote.go @@ -168,7 +168,7 @@ func unquote(quoted string) (s string, triple bool, err error) { err = fmt.Errorf(`truncated escape sequence %s`, quoted) return } - n, err1 := strconv.ParseInt(quoted[2:4], 16, 0) + n, err1 := strconv.ParseUint(quoted[2:4], 16, 0) if err1 != nil { err = fmt.Errorf(`invalid escape sequence %s`, quoted[:4]) return |