diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | ext/win32/lib/win32/registry.rb | 2 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 12 insertions, 2 deletions
@@ -1,3 +1,13 @@ +Mon Aug 17 23:27:45 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] + +Mon Aug 17 23:27:45 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * ext/win32/lib/win32/registry.rb (API#SetValue): add terminator + size, not 1 byte. [ruby-core:70365] [Bug #11439] + Mon Aug 17 17:57:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org> * re.c (rb_memsearch): should match only char boundaries in wide diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index d1cc06e970..911821a1b3 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -315,7 +315,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 + 1 + size ||= data.bytesize + WCHAR_SIZE end check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size) end @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.1.7" #define RUBY_RELEASE_DATE "2015-08-17" -#define RUBY_PATCHLEVEL 398 +#define RUBY_PATCHLEVEL 399 #define RUBY_RELEASE_YEAR 2015 #define RUBY_RELEASE_MONTH 8 |