summaryrefslogtreecommitdiff
path: root/decode_scan.go
diff options
context:
space:
mode:
Diffstat (limited to 'decode_scan.go')
-rw-r--r--decode_scan.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/decode_scan.go b/decode_scan.go
index 249975d..b9a5ea8 100644
--- a/decode_scan.go
+++ b/decode_scan.go
@@ -62,7 +62,7 @@ func (sc *runeTypeScannerImpl) Reset() {
sc.rType, err = sc.parser.HandleRune(sc.rRune)
if err != nil {
sc.rErr = &DecodeSyntaxError{
- Offset: sc.offset,
+ Offset: sc.offset - int64(sc.rSize),
Err: err,
}
} else {
@@ -89,7 +89,7 @@ func (sc *runeTypeScannerImpl) ReadRuneType() (rune, int, internal.RuneType, err
sc.rType, err = sc.parser.HandleRune(sc.rRune)
if err != nil {
sc.rErr = &DecodeSyntaxError{
- Offset: sc.offset,
+ Offset: sc.offset - int64(sc.rSize),
Err: err,
}
} else {