From 4e3ec632a2a75f60eb7114bf2cae3ddecfa9c348 Mon Sep 17 00:00:00 2001 From: matz Date: Wed, 26 Apr 2006 08:01:45 +0000 Subject: * pack.c (pack_unpack): now supports CRLF newlines. a patch from . [ruby-dev:28601] git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ pack.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 036d64df7..6d346e0f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Apr 26 16:59:24 2006 Yukihiro Matsumoto + + * pack.c (pack_unpack): now supports CRLF newlines. a patch from + . [ruby-dev:28601] + Tue Apr 25 18:00:05 2006 Hidetoshi NAGAI * ext/tk/tcltklib.c (delete_slaves): maybe increment the reference diff --git a/pack.c b/pack.c index 0e5f2b89e..efd69c95b 100644 --- a/pack.c +++ b/pack.c @@ -1834,6 +1834,8 @@ pack_unpack(str, fmt) while (s < send) { if (*s == '=') { if (++s == send) break; + if (s+1 < send && *s == '\r' && *(s+1) == '\n') + s++; if (*s != '\n') { if ((c1 = hex2num(*s)) == -1) break; if (++s == send) break; -- cgit