diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-15 01:51:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-08-15 01:51:10 +0000 |
commit | c5196e249e5b5bb06a4f0b71a05bc1dd10b12342 (patch) | |
tree | d424feb8d4a9439cb1ee8770f0f37e4996578521 /ext | |
parent | cfa7550b6680fac48fcdc9d5c80dadeb71186dae (diff) | |
download | ruby-c5196e249e5b5bb06a4f0b71a05bc1dd10b12342.tar.gz |
win32/registry.rb: size in bytes
* ext/win32/lib/win32/registry.rb (API#SetValue): data size should
be in bytes, not in chars. [ruby-core:70365] [Bug #11439]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51584 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/win32/lib/win32/registry.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index 3830a5a3ee..aa2d9fc0ce 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -326,7 +326,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr case type when REG_SZ, REG_EXPAND_SZ, REG_MULTI_SZ data = data.encode(WCHAR) - size ||= data.size + WCHAR_SIZE + size ||= data.bytesize + WCHAR_SIZE end check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size) end |