summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
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 23df91aaa4..8826e94c5f 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;
}