Lists_MakeMask: Don't destroy source buffer
authorAlexander Barton <alex@barton.de>
Fri, 8 Aug 2014 11:50:48 +0000 (13:50 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 8 Aug 2014 11:50:48 +0000 (13:50 +0200)
src/ngircd/lists.c

index 563dfa4..022e305 100644 (file)
@@ -285,6 +285,7 @@ Lists_MakeMask(const char *Pattern, char *mask, size_t len)
                strlcpy(mask, Pattern, len - 5);
                strlcat(mask, "!*@", len);
                strlcat(mask, at, len);
+               at--; *at = '@';
        } else {
                /* All parts (nick, user and domain name) are given */
                strlcpy(mask, Pattern, len);