summaryrefslogtreecommitdiffstats
path: root/dln.c
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-12 14:45:12 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-07-12 14:45:12 +0000
commit70e7f3dec0ad05de4bf555ff4a6db53dea0c99e6 (patch)
treec5f09ca57714edbdd33cbc13b1864aadb44170bb /dln.c
parente4dbfc4cae378b0f262e5ae6ce30f1c8cba2fa62 (diff)
downloadruby-70e7f3dec0ad05de4bf555ff4a6db53dea0c99e6.tar.gz
ruby-70e7f3dec0ad05de4bf555ff4a6db53dea0c99e6.tar.xz
ruby-70e7f3dec0ad05de4bf555ff4a6db53dea0c99e6.zip
merges r23906 from trunk into ruby_1_9_1.
-- * dln.c (dln_find_1): fixed index overrun. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@24047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dln.c')
-rw-r--r--dln.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dln.c b/dln.c
index 23df91aaa..8826e94c5 100644
--- a/dln.c
+++ b/dln.c
@@ -1564,8 +1564,8 @@ dln_find_1(const char *fname, const char *path, char *fbuf, int size,
}
}
if (ext) {
- for (j = 0; STRCASECMP(ext, extension[j]); j++) {
- if (j == sizeof(extension) / sizeof(extension[0])) {
+ for (j = 0; STRCASECMP(ext, extension[j]); ) {
+ if (++j == sizeof(extension) / sizeof(extension[0])) {
ext = 0;
break;
}