aboutsummaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Court`es2007-03-28 09:26:08 +0000
committerLudovic Court`es2007-03-28 09:26:08 +0000
commita10f47f6e328491ad29d1637b724d86f6bc7b997 (patch)
tree7a54a1fa851e0d85e58fb0a26391912ce17ac680 /src/guile
parent79eecc5bd507411bdff52b17f8c5e086b10c733a (diff)
parent36827777a3d21d5628096dafa33c2b71eb101248 (diff)
downloadskribilo-a10f47f6e328491ad29d1637b724d86f6bc7b997.tar.gz
skribilo-a10f47f6e328491ad29d1637b724d86f6bc7b997.tar.lz
skribilo-a10f47f6e328491ad29d1637b724d86f6bc7b997.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: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-77
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/package/diff.scm2
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))