diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-09 00:50:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-09 00:50:37 +0000 |
commit | c9c095fc7b56c40e4857c1554932a078eb7a316e (patch) | |
tree | 2c9a6eb924e6cca3317a2c82cb473bd36b9fda28 /string.c | |
parent | 0f406d278fce4909940ed52df2009b18fee2c22a (diff) |
* string.c (rb_str_justify): fixed the case a fill size is a
multiple of the length of the padding. [ruby-dev:39856]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6635,7 +6635,7 @@ rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag) p += llen; } else { - while (llen > fclen) { + while (llen >= fclen) { memcpy(p,f,flen); p += flen; llen -= fclen; @@ -6652,7 +6652,7 @@ rb_str_justify(int argc, VALUE *argv, VALUE str, char jflag) p += rlen; } else { - while (rlen > fclen) { + while (rlen >= fclen) { memcpy(p,f,flen); p += flen; rlen -= fclen; |