ruby-changes:7989
From: usa <ko1@a...>
Date: Wed, 24 Sep 2008 14:39:58 +0900 (JST)
Subject: [ruby-changes:7989] Ruby:r19513 (trunk): * lib/tmpdir.rb: setup buffer with nul characters instead of spaces.
usa 2008-09-24 14:39:39 +0900 (Wed, 24 Sep 2008) New Revision: 19513 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19513 Log: * lib/tmpdir.rb: setup buffer with nul characters instead of spaces. fixed [ruby-dev:36493] Modified files: trunk/ChangeLog trunk/lib/tmpdir.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 19512) +++ ChangeLog (revision 19513) @@ -1,3 +1,8 @@ +Wed Sep 24 14:38:29 2008 NAKAMURA Usaku <usa@r...> + + * lib/tmpdir.rb: setup buffer with nul characters instead of spaces. + fixed [ruby-dev:36493] + Wed Sep 24 11:18:33 2008 Yukihiro Matsumoto <matz@r...> * io.c (rb_io_s_binread): offset argument was wrongly passed to Index: lib/tmpdir.rb =================================================================== --- lib/tmpdir.rb (revision 19512) +++ lib/tmpdir.rb (revision 19513) @@ -14,7 +14,7 @@ require 'Win32API' CSIDL_LOCAL_APPDATA = 0x001c max_pathlen = 260 - windir = ' '*(max_pathlen+1) + windir = "\0"*(max_pathlen+1) begin getdir = Win32API.new('shell32', 'SHGetFolderPath', 'LLLLP', 'L') raise RuntimeError if getdir.call(0, CSIDL_LOCAL_APPDATA, 0, 0, windir) != 0 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/