From 25f1f42a140db15e451afc473d802bc87170d172 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Wed, 10 Nov 2010 22:52:33 +1000 Subject: Fix a bug in the UTF-8 implementation of string last Indexing into the wrong string Signed-off-by: Steve Bennett --- jim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jim.c') diff --git a/jim.c b/jim.c index fe024b0..56e44b7 100644 --- a/jim.c +++ b/jim.c @@ -366,7 +366,7 @@ static int JimStringLast(const char *s1, int l1, const char *s2, int l2) while ((i = JimStringFirst(s1, l1, s2, l2, i)) >= 0) { int c; result = i; - i += utf8_tounicode(s1 + i, &c); + i += utf8_tounicode(s2 + i, &c); } return result; #else -- cgit v1.1