From db107602bdc3913efdfd14b409e62ac0468fcf8c Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 2 Aug 2019 13:48:39 -0400 Subject: [PATCH] handle messages with \r\n --- libi2pd_client/SAM.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libi2pd_client/SAM.cpp b/libi2pd_client/SAM.cpp index dda566c9..766a1940 100644 --- a/libi2pd_client/SAM.cpp +++ b/libi2pd_client/SAM.cpp @@ -239,6 +239,7 @@ namespace client char * eol = (char *)memchr (m_Buffer, '\n', bytes_transferred); if (eol) { + if (eol > m_Buffer && eol[-1] == '\r') eol--; *eol = 0; char * separator = strchr (m_Buffer, ' '); if (separator)