From 14695c4c1aed1067d73dca044d3367c54f3b5565 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 24 Sep 2013 07:35:12 +0000 Subject: win32/registry.rb: fix runtime errors * ext/win32/lib/win32/registry.rb (Win32::Registry::API#EnumKey): size of the name is in WCHARs, not in bytes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32/lib/win32/registry.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/win32/lib') diff --git a/ext/win32/lib/win32/registry.rb b/ext/win32/lib/win32/registry.rb index 0b4e5870a5..d989bc0e7e 100644 --- a/ext/win32/lib/win32/registry.rb +++ b/ext/win32/lib/win32/registry.rb @@ -298,7 +298,7 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr size = packdw(Constants::MAX_KEY_LENGTH) wtime = ' ' * 8 check RegEnumKeyExW.call(hkey, index, name, size, 0, 0, 0, wtime) - [ name[0, unpackdw(size)/WCHAR_SIZE].encode, unpackqw(wtime) ] + [ name[0, unpackdw(size)].encode, unpackqw(wtime) ] end def QueryValue(hkey, name) -- cgit v1.2.3