usb_cables: fix generator script

This commit is contained in:
King Kévin 2019-12-11 13:23:27 +01:00
parent f31fd6052d
commit aa6bb0ace7
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ cables.each_index do |i|
next if 0 == i
cable = cables[i]
# find if there was a previously matching definition
template = cables[0, (i-1)].filter {|c| c[:name] == cable[:name]}.first
template = cables[0, i].filter {|c| c[:name] == cable[:name]}.first
next unless template
puts "generate #{cable[:variable]} usng #{template[:variable]}"
array = template[:array]