From 61900d7e93780dd9d7d6db02fe3ad07a72a8a45b Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Sat, 5 Mar 2011 23:44:23 -0500 Subject: [PATCH] 2011-03-05 Clinton Ebadi * libguile/regex-posix.c (scm_regexp_exec): Only fixup byte to character offset when the string is actually multibyte encoded. --- libguile/regex-posix.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 3423099..db76e36 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -305,7 +305,7 @@ SCM_DEFINE (scm_regexp_exec, "regexp-exec", 2, 2, 0, scm_to_int (flags)); #ifdef HAVE_WCHAR_H - if (!status) + if ((!status) && (scm_to_int (scm_string_bytes_per_char (substr)) > 1)) fixup_multibyte_match (matches, nmatches, c_str); #endif -- 1.6.6.1