mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-28 09:13:08 +03:00
[project @ 2004-05-21 23:05:53 by jmb]
Improve parameter checking in imagemap_get. svn path=/import/netsurf/; revision=883
This commit is contained in:
parent
3c707fbeea
commit
bb9149e93b
@ -434,13 +434,15 @@ char *imagemap_get(struct content *c, const char *key, unsigned long x,
|
||||
unsigned long cx, cy;
|
||||
|
||||
assert(c->type == CONTENT_HTML);
|
||||
if (key == NULL) return NULL;
|
||||
|
||||
slot = imagemap_hash(key);
|
||||
|
||||
for (map = c->data.html.imagemaps[slot];
|
||||
map != 0 && strcasecmp(map->key, key) != 0;
|
||||
map = map->next)
|
||||
;
|
||||
map != 0; map = map->next) {
|
||||
if (map->key != 0 && strcasecmp(map->key, key) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (map == 0) return NULL;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user