summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 08:54:21 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-14 08:54:21 +0000
commit1f433219918829a6f0afc0f926fc46ea01e3156a (patch)
treecef20281cfd60a4fb8564ac3a144fdebc437610d /util.c
parente368a2e15833892697889a55a873fd3431072a74 (diff)
* util.c (ruby_each_words): assume no string exceeds INT_MAX.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 48d403e80c..99e04e7bf2 100644
--- a/util.c
+++ b/util.c
@@ -3816,7 +3816,7 @@ ruby_each_words(const char *str, void (*func)(const char*, int, void*), void *ar
if (!*str) break;
end = str;
while (*end && !ISSPACE(*end) && *end != ',') end++;
- len = end - str;
+ len = (int)(end - str); /* assume no string exceeds INT_MAX */
(*func)(str, len, arg);
}
}