diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-15 07:48:47 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-04-15 07:48:47 +0000 |
commit | 9a24232fd28baa60a4a460b2fc70a538b746bca0 (patch) | |
tree | 0271f0e93347e90c82031366dc666f7f93838370 /pack.c | |
parent | cb944528b6e73eb220d31f487d350e752aef5027 (diff) | |
download | bundler-9a24232fd28baa60a4a460b2fc70a538b746bca0.tar.gz |
* pack.c (pack_unpack): should treat 'U' in character unit, not in
byte unit.
* error.c (exc_initialize): should clear backtrace information.
* io.c (rb_io_fptr_cleanup): should close IO created by IO.new(fd).
* rubyio.h: remove FMODE_FDOPEN
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1468,11 +1468,11 @@ pack_unpack(str, fmt) case 'U': if (len > send - s) len = send - s; while (len > 0 && s < send) { - int alen = len; + int alen = send - s; unsigned long l; l = utf8_to_uv(s, &alen); - s += alen; len -= alen; + s += alen; len--; rb_ary_push(ary, rb_uint2inum(l)); } break; |