Skip to content

Commit

Permalink
Merge pull request #51 from elmundio87/dword-key-check-hanging-fix
Browse files Browse the repository at this point in the history
Test run hangs if checking a registry key with a DWORD value that contains less than 8 characters
  • Loading branch information
mizzy committed Feb 11, 2014
2 parents fe11629 + 1bb24f8 commit 5f1ca6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/specinfra/command/windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def convert_key_property_value property
byte_array = [property[:value]].pack('H*').bytes.to_a
"([byte[]] #{byte_array.join(',')})"
when :type_dword
[property[:value].scan(/[0-9a-f]{2}/i).reverse.join].pack("H*").unpack("l").first
[property[:value].rjust(8, '0').scan(/[0-9a-f]{2}/i).reverse.join].pack("H*").unpack("l").first
when :type_qword
property[:value].hex
else
Expand Down

0 comments on commit 5f1ca6e

Please sign in to comment.