Error in "amd-info" script

#1

Here is the output of “amd-info”:
[spoiler]


Wed Apr 11 14:19:47 MSK 2018

=== GPU 0, 02:00.0 /sys/class/drm/card3 ===
Adapter 0: Ellesmere [Radeon RX 470/480/570/580]
  Core: 1080 MHz, Mem: 2100 MHz, CoreOD: 0, MemOD: 0, Load: 100%, Temp: 69 C, Fan: 22.7451%
  Core clocks: 300 466 751 1019 1074 1080 1126 1145
  Memory Clocks: 300 2100
manual 	DPM 7 CORE 1145Mhz V 65285	MEMSTATE 1 MEM 1980Mhz 		PWR 87.181 W

=== GPU 1, 06:00.0 /sys/class/drm/card1 ===
Adapter 1: Ellesmere [Radeon RX 470/480/570/580]
  Core: 940 MHz, Mem: 1950 MHz, CoreOD: 0, MemOD: 0, Load: 100%, Temp: 73 C, Fan: 100%
  Core clocks: 300 560 660 760 860 940 1060 1145
  Memory Clocks: 300 1950
manual 	DPM 5 CORE 940Mhz V 65286	MEMSTATE 1 MEM 1950Mhz 		PWR 76.4 W

=== GPU 2, 08:00.0 /sys/class/drm/card2 ===
Adapter 2: Ellesmere [Radeon RX 470/480/570/580]
  Core: 1000 MHz, Mem: 1950 MHz, CoreOD: 0, MemOD: 0, Load: 100%, Temp: 69 C, Fan: 80%
  Core clocks: 300 560 660 760 860 1000 1060 1145
  Memory Clocks: 300 1950
manual 	DPM 5 CORE 1000Mhz V 65286	MEMSTATE 1 MEM 1950Mhz 		PWR 78.205 W

=== GPU 3, 09:00.0 /sys/class/drm/card0 ===
Adapter 3: Ellesmere [Radeon RX 470/480/570/580]
  Core: 1145 MHz, Mem: 1980 MHz, CoreOD: 0, MemOD: 0, Load: 100%, Temp: 70 C, Fan: 45.8824%
  Core clocks: 300 608 910 1077 1085 1091 1100 1145
  Memory Clocks: 300 1980
manual 	DPM 5 CORE 1080Mhz V 65286	MEMSTATE 1 MEM 2100Mhz 		PWR 80.135 W

[/spoiler]
For every card in the dump, the first and the last lines are for one card, but the body is for another card.
It seems that the script has error in device numbering.