diff options
author | Ludovic Court`es | 2007-03-28 08:14:32 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-03-28 08:14:32 +0000 |
commit | 36827777a3d21d5628096dafa33c2b71eb101248 (patch) | |
tree | 29d2272c8953dc9c13ca28b3ee45379fcc5ff802 /src/guile | |
parent | 0be8b41328f05aee4610b190b00b51d459e28395 (diff) | |
download | skribilo-36827777a3d21d5628096dafa33c2b71eb101248.tar.gz skribilo-36827777a3d21d5628096dafa33c2b71eb101248.tar.lz skribilo-36827777a3d21d5628096dafa33c2b71eb101248.zip |
`diff' package: Fixed off-by-one in string diff.
* src/guile/skribilo/package/diff.scm (add-unchanged): When `(null?
edits)', check whether `(< str-pos str-len)' (was `(< str-pos (-
str-len 1))'). This fixes off-by-one when diffing strings (last
character didn't appear).
git-archimport-id: lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-36
Diffstat (limited to 'src/guile')
-rw-r--r-- | src/guile/skribilo/package/diff.scm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/guile/skribilo/package/diff.scm b/src/guile/skribilo/package/diff.scm index 7e9dc53..f3f6cba 100644 --- a/src/guile/skribilo/package/diff.scm +++ b/src/guile/skribilo/package/diff.scm @@ -145,7 +145,7 @@ (result '()) (str-pos 0)) (if (null? edits) - (reverse! (if (< str-pos (- str-len 1)) + (reverse! (if (< str-pos str-len) (cons (list 'unchanged str-pos (- str-len 1)) result) result)) |