From 0d96d40b304f5c196a6be86eca00cb0c6411960d Mon Sep 17 00:00:00 2001 From: Valentin Batz Date: Sun, 10 Oct 2004 18:10:30 +0000 Subject: [PATCH] Fixed bug with logging where item names starting with the same string were not logged properly. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3314 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/log.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/core/log.c b/src/core/log.c index 18715832..4d49402e 100644 --- a/src/core/log.c +++ b/src/core/log.c @@ -252,15 +252,9 @@ static int itemcmp(const char *patt, const char *item) if (item == NULL) return g_strcasecmp(patt, "*") != 0; - - for (;*patt != '\0'; patt++, item++) - { - if (*patt == '*') - return 0; - if (*patt != *item) - return 1; - } - return 0; + if (*patt == '*') + return 0; + return g_strcasecmp(patt, item); } LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item,