diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gmcerts.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gmcerts.c b/src/gmcerts.c index 6370057d..484f8766 100644 --- a/src/gmcerts.c +++ b/src/gmcerts.c | |||
@@ -145,7 +145,15 @@ iBool isUsedOn_GmIdentity(const iGmIdentity *d, const iString *url) { | |||
145 | size_t pos = iInvalidPos; | 145 | size_t pos = iInvalidPos; |
146 | locate_StringSet(d->useUrls, url, &pos); | 146 | locate_StringSet(d->useUrls, url, &pos); |
147 | if (pos < size_StringSet(d->useUrls)) { | 147 | if (pos < size_StringSet(d->useUrls)) { |
148 | return startsWithCase_String(url, cstr_String(constAt_StringSet(d->useUrls, pos))); | 148 | if (!cmpStringCase_String(url, constAt_StringSet(d->useUrls, pos))) { |
149 | return iTrue; | ||
150 | } | ||
151 | } | ||
152 | if (pos > 0) { | ||
153 | /* URLs with a longer path will be following the shorter URL(s). */ | ||
154 | if (startsWithCase_String(url, cstr_String(constAt_StringSet(d->useUrls, pos - 1)))) { | ||
155 | return iTrue; | ||
156 | } | ||
149 | } | 157 | } |
150 | return iFalse; | 158 | return iFalse; |
151 | } | 159 | } |