[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:
John Mark Bell 2004-05-21 23:05:53 +00:00
parent 3c707fbeea
commit bb9149e93b

View File

@ -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;