From fd54e35e6401dbd51be42ab122ad78d68d99ac31 Mon Sep 17 00:00:00 2001 From: Tinyblargon <76069640+Tinyblargon@users.noreply.github.com> Date: Mon, 11 Nov 2024 20:06:09 +0100 Subject: [PATCH] fix: `QemuUSBs` iterating non existing items --- proxmox/config_qemu_usb.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox/config_qemu_usb.go b/proxmox/config_qemu_usb.go index 47ce2ee1..447aaa5a 100644 --- a/proxmox/config_qemu_usb.go +++ b/proxmox/config_qemu_usb.go @@ -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)) }