- support \n and \r\n line endings in ReadMessages
// Look for the end of the message
for (char *I = Buffer; I + 1 < End; I++)
{
- if (I[0] != '\n' || I[1] != '\n')
+ if (I[1] != '\n' ||
+ (strncmp(I, "\n\n", 2) != 0 && strncmp(I, "\r\n\r\n", 4) != 0))
continue;
// Pull the message out
PartialMessage += Message;
// Fix up the buffer
- for (; I < End && *I == '\n'; I++);
+ for (; I < End && (*I == '\r' || *I == '\n'); ++I);
End -= I-Buffer;
memmove(Buffer,I,End-Buffer);
I = Buffer;
+apt (0.9.8~exp1) UNRELEASED; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/contrib/strutl.cc:
+ - support \n and \r\n line endings in ReadMessages
+
+ -- David Kalnischkies <kalnischkies@gmail.com> Mon, 09 Jul 2012 17:36:40 +0200
+
apt (0.9.7.1) unstable; urgency=low
[ Program translation updates ]