From 7937cb7ca07301a437c526cfe914c8166b31e3a7 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 5 Mar 2008 15:34:02 +0000 Subject: * sprintf.c (rb_str_format): size_t returned from strlen() can be unsigned. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sprintf.c') diff --git a/sprintf.c b/sprintf.c index a100946aa..53d2d8bfc 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)); -- cgit