From e3eb903e2a0f96a4e08fd735bbfb6406f53af078 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 12 Feb 2004 00:36:47 +0000 Subject: Simplify and hopefully fix mem corruption 2004-02-12 Marco Pesenti Gritti * lib/widgets/ephy-location-entry.c: (keyword_match): Simplify and hopefully fix mem corruption --- lib/widgets/ephy-location-entry.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib/widgets') 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++; } -- cgit v1.2.3