summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-05 15:34:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-05 15:34:02 +0000
commit8c889459cf17b4d5b664fa98062e83f10da3d33b (patch)
tree77c97f695f7b50d2ef5f612e82798633a91b4ad3 /sprintf.c
parent79cdf2ffa201b3b9f1108d77231a7adae2c4e3bb (diff)
* sprintf.c (rb_str_format): size_t returned from strlen() can be
unsigned. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sprintf.c b/sprintf.c
index a100946..53d2d8b 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -802,7 +802,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
blen++;
need--;
}
- while (need-- - strlen(expr) > 0) {
+ while (need-- > strlen(expr)) {
buf[blen++] = '0';
}
strncpy(&buf[blen], expr, strlen(expr));