Skip to content

Commit 1ff090c

Browse files
authored
Fixed #73 (#75)
Closed #73
1 parent 1d8ad07 commit 1ff090c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/one_gadget/helper.rb

+1-4
Original file line numberDiff line numberDiff line change
@@ -284,10 +284,7 @@ def objdump_arch_supported?(bin, arch)
284284
return false if bin.nil?
285285

286286
arch = objdump_arch(arch)
287-
archs = `#{::Shellwords.join([bin, '--help'])}`.lines.find { |c| c.include?('supported architectures') }
288-
return false if archs.nil?
289-
290-
archs.split.include?(arch)
287+
`#{::Shellwords.join([bin, '--help'])}`.lines.any? { |c| c.split.include?(arch) }
291288
end
292289

293290
# Converts to the architecture name shown in objdump's +--help+ command.

0 commit comments

Comments
 (0)