summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-26 08:32:35 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-12-26 08:32:35 +0000
commit8369164408f2f9aa2984257f428f957876a84ced (patch)
tree200242150ac9ce61cc99d220002ff41111de87f9 /string.c
parenta5dcc4437e3354996f8242503d678f0eb5193809 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string.c b/string.c
index 5edac14e66..33afb982c3 100644
--- a/string.c
+++ b/string.c
@@ -1494,8 +1494,8 @@ rb_str_inspect(str)
char c = *p++;
if (ismbchar(c) && p < pend) {
int len = mbclen(c);
- rb_str_cat(result, p, len);
- p += len;
+ rb_str_cat(result, p - 1, len);
+ p += len - 1;
}
else if (c == '"'|| c == '\\') {
s[0] = '\\'; s[1] = c;