aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2016-03-28 15:14:47 +0000
committerTatsuya Kinoshita <tats@debian.org>2016-03-29 10:12:56 +0000
commit686a824dd4db759a96c5d237e7e132fc2fe1aa7d (patch)
tree54e41c4ab0a0965c91090efbf941ecab37fa6fa8
parentUpdate ChangeLog (diff)
downloadw3m-686a824dd4db759a96c5d237e7e132fc2fe1aa7d.tar.gz
w3m-686a824dd4db759a96c5d237e7e132fc2fe1aa7d.zip
Fix style of array index is used before limits check
Bug: https://sourceforge.net/p/w3m/feature-requests/25/
-rw-r--r--url.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/url.c b/url.c
index d346312..9eb2f09 100644
--- a/url.c
+++ b/url.c
@@ -2080,7 +2080,7 @@ filename_extension(char *path, int is_url)
break;
}
if (*last_dot == '.') {
- for (i = 1; last_dot[i] && i < 8; i++) {
+ for (i = 1; i < 8 && last_dot[i]; i++) {
if (is_url && !IS_ALNUM(last_dot[i]))
break;
}