Skip to content

Commit c4a6cc1

Browse files
committed
Array was being checked with even? and should be array.size.even?
Signed-off-by: Craig Smith <[email protected]>
1 parent 3208986 commit c4a6cc1

File tree

1 file changed

+1
-1
lines changed
  • lib/msf/core/post/hardware/automotive

1 file changed

+1
-1
lines changed

lib/msf/core/post/hardware/automotive/uds.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def get_dtcs(bus, src_id, dst_id, opt = {})
393393
end
394394
if (data.key? "Packets") && !data["Packets"].empty?
395395
data = response_hash_to_data_array(dst_id, data, 4)
396-
if !data.empty? && data.even?
396+
if !data.empty? && data.size.even?
397397
(0..data.size / 2).step(2) do |idx|
398398
code = ""
399399
case data[idx].hex & 0xC0 >> 3

0 commit comments

Comments
 (0)