summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-04-09 17:17:33 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-04-09 17:17:33 -0400
commit427f4120f77d55ca04ac559747651469e3e86260 (patch)
tree8890a666d61901e3ce050b0e9da6fa86a7008db9 /src
parent1dca58e76cb14b8186ce88c382ab764845d3d980 (diff)
Fix bug with character literals
Diffstat (limited to 'src')
-rw-r--r--src/texec/eval.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/texec/eval.go b/src/texec/eval.go
index 33f838e..510805e 100644
--- a/src/texec/eval.go
+++ b/src/texec/eval.go
@@ -374,7 +374,7 @@ func getStringLiteral(v tparse.Node) []interface{} {
}
func getCharLiteral(v tparse.Node) byte {
- val, mb, _, err := strconv.UnquoteChar(v.Data.Data, byte('\''))
+ val, mb, _, err := strconv.UnquoteChar(v.Data.Data[1:], byte('\''))
if err != nil || mb == true{
errOut(fmt.Sprintf("Failed to parse character as single byte. %v", v.Data))