summaryrefslogtreecommitdiff
path: root/module
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2021-04-29 21:46:31 +0200
committerAndy Wingo <wingo@pobox.com>2021-04-29 21:46:31 +0200
commit7da831af18d1de63b5c98339241473271dc993d2 (patch)
treead00eea2d8df2e6d867b86cea4653dcaf5ee0755 /module
parent8c1a26f4d4311e2e90f006545e31e3f4638ed2b6 (diff)
downloadguile-7da831af18d1de63b5c98339241473271dc993d2.tar.gz
Fix line and column for read errors
* module/ice-9/read.scm (%read): Add 1 to both line and column: the former to make 1-based user lines instead of 0-based Guile lines, and the latter because apparently that's how we always did it :) Fixes
Diffstat (limited to 'module')
-rw-r--r--module/ice-9/read.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/ice-9/read.scm b/module/ice-9/read.scm
index a8dbd92f9..ccf8e3cea 100644
--- a/module/ice-9/read.scm
+++ b/module/ice-9/read.scm
@@ -126,7 +126,8 @@
(scm-error 'read-error #f
(format #f "~A:~S:~S: ~A"
(or filename "#<unknown port>")
- (port-line port) (port-column port)
+ (1+ (port-line port))
+ (1+ (port-column port))
msg)
args #f))