mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
cfa7550b66
commit
c5196e249e
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Aug 15 10:51:08 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/win32/lib/win32/registry.rb (API#SetValue): data size should
|
||||
be in bytes, not in chars. [ruby-core:70365] [Bug #11439]
|
||||
|
||||
Sat Aug 15 10:15:20 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* io.c (rb_io_each_codepoint): read more data when read partially.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue