aboutsummaryrefslogtreecommitdiff
path: root/syntax/quote.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2019-01-02 18:36:24 -1000
committeralandonovan <adonovan@google.com>2019-01-02 23:36:24 -0500
commit74f6cacf9e604301442678325c3dfb2d0caeb0ab (patch)
tree2be81d7e7c7d3e55acb43c521aa8d1e21a973bad /syntax/quote.go
parentf9eba728dc959ed06f508aaac74f1fe710800c8f (diff)
downloadstarlark-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.go2
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