diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-02 02:57:05 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-02 02:57:05 +0000 |
commit | c78dbcd13121cecaac64fec7956d0929867bff50 (patch) | |
tree | e7722ea408ee237a2e46947f77f6f9d44f348c4e | |
parent | 4dcaa9e5aae6cc9fa3b5bfb1dc7b0d9365e10e13 (diff) | |
download | ruby-c78dbcd13121cecaac64fec7956d0929867bff50.tar.gz |
* win32/win32.c (init_env): wrong calculation of the head of setenv
string. [ruby-core:29216]
a patch from Heesob Park in [ruby-core:29218]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | win32/win32.c | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Fri Apr 2 11:54:49 2010 NAKAMURA Usaku <usa@ruby-lang.org> + + * win32/win32.c (init_env): wrong calculation of the head of setenv + string. [ruby-core:29216] + a patch from Heesob Park in [ruby-core:29218] + Fri Apr 2 08:24:56 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> * process.c (ruby_setsid): split from proc_setsid. diff --git a/win32/win32.c b/win32/win32.c index 800f0debe4..42fbdb591b 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -456,7 +456,7 @@ init_env(void) #define env wk.val #define set_env_val(vname) do { \ typedef char namesizecheck[numberof(wk.name) < numberof(vname) - 1 ? -1 : 1]; \ - WCHAR *const buf = wk.name + numberof(wk.name) - numberof(vname); \ + WCHAR *const buf = wk.name + numberof(wk.name) - numberof(vname) + 1; \ MEMCPY(buf, vname, WCHAR, numberof(vname) - 1); \ _wputenv(buf); \ } while (0) |