Skip to content

Commit

Permalink
fix: QemuUSBs iterating non existing items
Browse files Browse the repository at this point in the history
  • Loading branch information
Tinyblargon authored Nov 11, 2024
1 parent 0146e30 commit fd54e35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxmox/config_qemu_usb.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const QemuUSBsAmount = uint8(QemuUsbIDMaximum) + 1

func (QemuUSBs) mapToSDK(params map[string]interface{}) QemuUSBs {
usbList := make(QemuUSBs)
for i := QemuUsbID(0); i < 14; i++ {
for i := QemuUsbID(0); i < QemuUsbID(QemuUSBsAmount); i++ {
if v, isSet := params["usb"+i.String()]; isSet {
usbList[i] = QemuUSB{}.mapToSDK(v.(string))
}
Expand Down

0 comments on commit fd54e35

Please sign in to comment.