From ee4390c437d9f9672bf8ef702ddc05fc5cdc1069 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès
Date: Fri, 6 Mar 2015 11:34:34 +0100
Subject: Fix off-by-one in 'substring' call in 'ast-location'.

* src/guile/skribilo/location.scm (ast-location): Fix off-by-one in
  'substring' call.
---
 src/guile/skribilo/location.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src')

diff --git a/src/guile/skribilo/location.scm b/src/guile/skribilo/location.scm
index fa88b18..7605600 100644
--- a/src/guile/skribilo/location.scm
+++ b/src/guile/skribilo/location.scm
@@ -1,7 +1,7 @@
 ;;; location.scm -- Skribilo source location.
 ;;; -*- coding: iso-8859-1 -*-
 ;;;
-;;; Copyright 2005, 2007, 2009, 2010, 2012, 2013  Ludovic Court�s <ludo@gnu.org>
+;;; Copyright 2005, 2007, 2009, 2010, 2012, 2013, 2015  Ludovic Court�s <ludo@gnu.org>
 ;;; Copyright 2003, 2004  Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
 ;;;
 ;;;
@@ -63,7 +63,7 @@
 	       (lenf  (string-length fname))
 	       (file  (if (and (string-prefix? pwd fname len)
 			       (> lenf len))
-			  (substring fname len (+ 1 (string-length fname)))
+			  (substring fname len (string-length fname))
 			  fname)))
 	  (format #f "~a, line ~a" file line))
 	"no source location")))
-- 
cgit v1.2.3