aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Courtès2009-03-24 23:05:56 +0100
committerLudovic Courtès2009-03-24 23:05:56 +0100
commit5c14d481ac0def0d81f67456a648502d89de5a06 (patch)
tree8f26c81bad8e5809f80e72d84063548cbf838ef4 /src
parent3832972faeeb2711248e0b2267b3fe2e41d1c0d5 (diff)
downloadskribilo-5c14d481ac0def0d81f67456a648502d89de5a06.tar.gz
skribilo-5c14d481ac0def0d81f67456a648502d89de5a06.tar.lz
skribilo-5c14d481ac0def0d81f67456a648502d89de5a06.zip
Robustify `invocation-location'.
* src/guile/skribilo/location.scm (invocation-location): Make sure DEPTH is not above STACK's length.
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/location.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/guile/skribilo/location.scm b/src/guile/skribilo/location.scm
index 47f72b7..5b50d63 100644
--- a/src/guile/skribilo/location.scm
+++ b/src/guile/skribilo/location.scm
@@ -1,7 +1,7 @@
;;; location.scm -- Skribilo source location.
;;;
+;;; Copyright 2005, 2007, 2009 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
-;;; Copyright 2005, 2007 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -89,6 +89,7 @@
(if (null? depth) 0 (car depth))))
(stack (make-stack #t)))
(and stack
+ (< depth (stack-length stack))
(let* ((frame (stack-ref stack depth))
(source (frame-source frame)))
(and source