aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-location-entry.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-12 08:36:47 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-12 08:36:47 +0800
commite3eb903e2a0f96a4e08fd735bbfb6406f53af078 (patch)
tree8466a9bdec446fd224012b45a5a6e00e4652eeb6 /lib/widgets/ephy-location-entry.c
parent3a866c187db97a60aef67e0b420436bfd17be65c (diff)
downloadgsoc2013-epiphany-e3eb903e2a0f96a4e08fd735bbfb6406f53af078.tar.gz
gsoc2013-epiphany-e3eb903e2a0f96a4e08fd735bbfb6406f53af078.tar.zst
gsoc2013-epiphany-e3eb903e2a0f96a4e08fd735bbfb6406f53af078.zip
Simplify and hopefully fix mem corruption
2004-02-12 Marco Pesenti Gritti <marco@gnome.org> * lib/widgets/ephy-location-entry.c: (keyword_match): Simplify and hopefully fix mem corruption
Diffstat (limited to 'lib/widgets/ephy-location-entry.c')
-rw-r--r--lib/widgets/ephy-location-entry.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index 61fc47c40..1e14e217b 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -208,19 +208,17 @@ keyword_match (const char *list,
for (i = 0; i < keyword_len; i++)
{
- if (p[i] == ' ')
- goto next_char;
-
if (p[i] != keyword[i])
+ {
goto next_token;
+ }
}
return TRUE;
next_token:
- while (*p != ' ') p++;
- next_char:
+ while (*p && *p != ' ') p++;
if (*p) p++;
}