summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 02:57:05 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-02 02:57:05 +0000
commitc78dbcd13121cecaac64fec7956d0929867bff50 (patch)
treee7722ea408ee237a2e46947f77f6f9d44f348c4e /win32
parent4dcaa9e5aae6cc9fa3b5bfb1dc7b0d9365e10e13 (diff)
* 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
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
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)