From 8836e7101258fd2a9b56bed2a69b2a0b3b39b015 Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 24 Sep 2008 05:39:39 +0000 Subject: * lib/tmpdir.rb: setup buffer with nul characters instead of spaces. fixed [ruby-dev:36493] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19513 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 2e82aa528..bcd66ab42 100644 --- a/lib/tmpdir.rb +++ b/lib/tmpdir.rb @@ -14,7 +14,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