summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-04-26 08:01:45 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-04-26 08:01:45 +0000
commitde27b2c9c299b1f97bf24325023bebdb9c9ae452 (patch)
treec0cd9766a503a70cfcaf62a9e3b12acb2b9b2dac
parent5120d92108eedb70539bd84d310e6e7cc654f1d5 (diff)
* pack.c (pack_unpack): now supports CRLF newlines. a patch from
<tommy at tmtm.org>. [ruby-dev:28601] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--pack.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 036d64df78..6d346e0f94 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 26 16:59:24 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * pack.c (pack_unpack): now supports CRLF newlines. a patch from
+ <tommy at tmtm.org>. [ruby-dev:28601]
+
Tue Apr 25 18:00:05 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/tcltklib.c (delete_slaves): maybe increment the reference
diff --git a/pack.c b/pack.c
index 0e5f2b89ed..efd69c95b7 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;