[recipes] Require exact matches for ingredients
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Require exact matches for ingredients
- Date: Sat, 31 Dec 2016 02:07:42 +0000 (UTC)
commit 930541fccfe41a4efd4cb32ba199d7545eb5b0e6
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 30 18:04:55 2016 -0500
Require exact matches for ingredients
The current code leads to things like "garlic powder " being
shown as "garlic" and the like.
src/gr-ingredient.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gr-ingredient.c b/src/gr-ingredient.c
index fb9d21a..b8c3d5a 100644
--- a/src/gr-ingredient.c
+++ b/src/gr-ingredient.c
@@ -82,8 +82,8 @@ gr_ingredient_find (const char *text)
cf_text = g_utf8_casefold (text, -1);
for (i = 0; names[i]; i++) {
- if (strstr (cf_text, cf_names[i]) != NULL ||
- strstr (cf_text, cf_en_names[i]) != NULL)
+ if (strcmp (cf_text, cf_names[i]) == 0 ||
+ strcmp (cf_text, cf_en_names[i]) == 0)
return names[i];
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]