mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@99759 d073be05-634f-4543-b044-5fe20cf6d1d6
28 lines
712 B
Diff
28 lines
712 B
Diff
--- src/idle-parser.c.orig 2012-11-16 00:49:32.000000000 -0800
|
|
+++ src/idle-parser.c 2012-11-16 13:42:55.000000000 -0800
|
|
@@ -230,14 +230,22 @@
|
|
IdleParserPrivate *priv = IDLE_PARSER_GET_PRIVATE(parser);
|
|
guint i;
|
|
guint lasti = 0;
|
|
- gchar *tmp;
|
|
+ gchar *tmp, *s;
|
|
gboolean line_ends = FALSE;
|
|
guint len;
|
|
gchar concat_buf[2 * (IRC_MSG_MAXLEN + 3)] = {'\0'};
|
|
|
|
g_assert(msg != NULL);
|
|
|
|
- len = strnlen(msg, IRC_MSG_MAXLEN + 3);
|
|
+// len = strnlen(msg, IRC_MSG_MAXLEN + 3);
|
|
+
|
|
+ s = msg;
|
|
+ len = 0;
|
|
+
|
|
+ while (*s != '\0' && len < IRC_MSG_MAXLEN + 3) {
|
|
+ s++;
|
|
+ len++;
|
|
+ }
|
|
|
|
for (i = 0; i < len; i++) {
|
|
if ((msg[i] == '\n' || msg[i] == '\r')) {
|