diff options
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 1e12f4bafc..3830a5a3ee 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 + 1 + size ||= data.size + WCHAR_SIZE end check RegSetValueExW.call(hkey, make_wstr(name), 0, type, data, size) end |