diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-10-12 21:43:03 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-10-12 21:43:03 +0200 |
commit | 6619c421aa34f1214beac570e81bba76a6de0570 (patch) | |
tree | 86f6050a488b3a7820b3bfff486c48eb68f53fd2 /src/plugins/irc/irc-raw.c | |
parent | 7d2e8b9143f060411edbf98aab8dd4158784d6d3 (diff) | |
download | weechat-6619c421aa34f1214beac570e81bba76a6de0570.zip |
irc: escape backslashes in raw buffer (closes #1838)
Diffstat (limited to 'src/plugins/irc/irc-raw.c')
-rw-r--r-- | src/plugins/irc/irc-raw.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/irc/irc-raw.c b/src/plugins/irc/irc-raw.c index 5f9226e25..093733404 100644 --- a/src/plugins/irc/irc-raw.c +++ b/src/plugins/irc/irc-raw.c @@ -244,6 +244,12 @@ irc_raw_message_print (struct t_irc_raw_message *raw_message) buf2[pos_buf2++] = hexa[ptr_buf[pos_buf] % 16]; pos_buf++; } + else if (ptr_buf[pos_buf] == '\\') + { + buf2[pos_buf2++] = '\\'; + buf2[pos_buf2++] = '\\'; + pos_buf++; + } else { char_size = weechat_utf8_char_size ((const char *)(ptr_buf + pos_buf)); |