aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2010-11-10 22:52:33 +1000
committerSteve Bennett <steveb@workware.net.au>2010-11-17 07:57:38 +1000
commit25f1f42a140db15e451afc473d802bc87170d172 (patch)
tree6bbd18109fe461a79c1d2ee44160066f0feb0920
parent84ae3392d8b001acb9731be6d95821f32704e3e6 (diff)
downloadjimtcl-25f1f42a140db15e451afc473d802bc87170d172.zip
jimtcl-25f1f42a140db15e451afc473d802bc87170d172.tar.gz
jimtcl-25f1f42a140db15e451afc473d802bc87170d172.tar.bz2
Fix a bug in the UTF-8 implementation of string last
Indexing into the wrong string Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim.c2
1 files changed, 1 insertions, 1 deletions
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