summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-12 11:17:06 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-02-12 11:17:06 +0000
commit42c802126215101feed36135ba8f9601895ec03a (patch)
treefde428b1886469b75e73222107e2ee5fdc798ef3 /string.c
parent997ff23758884944f28a089eaa50ac7eb1c026c6 (diff)
990212
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@400 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 18c876dcf3..1a6eb07959 100644
--- a/string.c
+++ b/string.c
@@ -1365,11 +1365,11 @@ rb_str_inspect(str)
while (p < pend) {
char c = *p++;
if (ismbchar(c) && p < pend) {
- int len = mbclen(c)-1;
+ int len = mbclen(c);
CHECK(len);
*b++ = c;
- while (len--) {
+ while (--len) {
*b++ = *p++;
}
}