summaryrefslogtreecommitdiff
path: root/ext/win32/lib
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2019-06-07 02:00:48 +0900
committerNobuyoshi Nakada <[email protected]>2019-06-07 02:00:48 +0900
commit2bc09665ab8e72d4320a55a274eae903262f29cd ()
tree747c5470e2f635c41d48afbe8e2fcea8d7004d99 /ext/win32/lib
parent09a2189c1b5dd5a28a052f9464a516213f89d6e7 (diff)
win32/registry.rb: fix potential infinite loop
* ext/win32/lib/win32/registry.rb (Win32::Registry#each_value): advance the index even if an error occurred in #read.
-rw-r--r--ext/win32/lib/win32/registry.rb4
1 files changed, 2 insertions, 2 deletions
@@ -575,9 +575,9 @@ For detail, see the MSDN[http://msdn.microsoft.com/library/en-us/sysinfo/base/pr
begin
type, data = read(subkey)
rescue Error
- next
end
- yield subkey, type, data
index += 1
end
index