diff options
author | Ludovic Court`es | 2007-03-28 09:26:08 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-03-28 09:26:08 +0000 |
commit | a10f47f6e328491ad29d1637b724d86f6bc7b997 (patch) | |
tree | 7a54a1fa851e0d85e58fb0a26391912ce17ac680 | |
parent | 79eecc5bd507411bdff52b17f8c5e086b10c733a (diff) | |
parent | 36827777a3d21d5628096dafa33c2b71eb101248 (diff) | |
download | skribilo-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
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | src/guile/skribilo/package/diff.scm | 2 |
2 files changed, 20 insertions, 1 deletions
@@ -2,6 +2,25 @@ # arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2 # +2007-03-28 09:26:08 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-77 + + Summary: + `diff' package: Fixed off-by-one in string diff. + Revision: + skribilo--devo--1.2--patch-77 + + * 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). + + modified files: + ChangeLog src/guile/skribilo/package/diff.scm + + new patches: + lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-36 + + 2007-03-28 09:25:20 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-76 Summary: 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)) |