1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2010-04-02 02:57:05 +00:00
parent 4dcaa9e5aa
commit c78dbcd131
2 changed files with 7 additions and 1 deletions

View file

@ -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.

View file

@ -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)