From 4c1e12921a21fc2d15284109167d0c3a2a92e869 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 27 Mar 2015 15:29:46 -0400 Subject: [PATCH] restore imcomplete string back --- SAM.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SAM.cpp b/SAM.cpp index d9057f23..85d3ca98 100644 --- a/SAM.cpp +++ b/SAM.cpp @@ -222,6 +222,12 @@ namespace client m_BufferOffset = bytes_transferred - processed; if (processed > 0) memmove (m_Buffer, m_Buffer + processed, m_BufferOffset); + else + { + // restore string back + *separator = ' '; + *eol = '\n'; + } } // since it's SAM v1 reply is not expected Receive ();