From 988a0eb0c2b25d54e7ba776ea65e1f740ba2cb09 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 26 Feb 2005 23:40:54 +0000 Subject: [PATCH] - Fixed bug in +G where with not-really-matching-words color was needlessly stripped, reported by SpeedFire (#0002375). --- Changes | 2 ++ src/badwords.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index ec6b373e5..001b94edb 100644 --- a/Changes +++ b/Changes @@ -674,3 +674,5 @@ - Module coders: using extcmode_default_requirechop is now depricated, check src/extcmodes.c ctrl+f extcmode_default_requirechop for more details (solution: copy+paste & fill in modechar). - Nicks with ~ are now also not cutoff anymore but rejected like any other illegal char (#0002074). +- Fixed bug in +G where with not-really-matching-words color was needlessly stripped, + reported by SpeedFire (#0002375). diff --git a/src/badwords.c b/src/badwords.c index 19f1f3a06..39b7071da 100644 --- a/src/badwords.c +++ b/src/badwords.c @@ -102,7 +102,6 @@ int cleaned = 0; pold = our_strcasestr(pold, badword->word); if (!pold) break; - cleaned = 1; if (replacen == -1) replacen = strlen(replacew); if (searchn == -1) @@ -131,6 +130,8 @@ int cleaned = 0; continue; } + cleaned = 1; /* still too soon? Syzop/20050227 */ + /* Do we have any not-copied-yet data? */ if (poldx != startw) { int tmp_n = startw - poldx;