From 0d78333b8ef6f5c5dc22488ca89e19ca7377d7aa Mon Sep 17 00:00:00 2001 From: shyouhei Date: Mon, 26 Jan 2009 02:11:36 +0000 Subject: merge revision(s) 19514: * lib/tmpdir.rb: setup buffer with nul characters instead of spaces. fixed [ruby-dev:36493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@21774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/tmpdir.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tmpdir.rb b/lib/tmpdir.rb index 7f9fd9a543..50b69ba9ad 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -12,7 +12,7 @@ class Dir 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 -- cgit v1.2.3